This topic is locked

Limit number of child records to 10

6/18/2021 3:20:12 PM
PHPRunner Tips and Tricks
A
AJShumak author

Hi,

I need to limit th enumber of child records added to 10. Not juts for any one users, but as a whole.
Any suggestions on how to do this?

A
AJShumak author 6/18/2021

Hi,

I saw this:

The best approach is to replace 'Add new' button with your own button (use 'Insert button' option). In this button server side code you can check the number of records already created and either redirect user to the Add page or display a message staying on the List page.

Now just need help with the code. How to check the number of records with a specific "Class Code" and only allow them to add if its less than 10.

img alt