Forum Discussion
QuickBaseCoachD
7 years agoQrew Captain
The code that you posted is a typical button to Add a child record to a Parent Record. Is the checkbox to be checked on the yet to be created child and you just want to prepopulate the field or do you want to check a box on the Parent Record.
- SalesInfo7 years agoQrew Assistant CaptainI want to check a box on the Parent Record, which is right next to the button. Once this is done, I'll create a rule which hides the button when the checkbox is checked.
Thank you! - QuickBaseCoachD7 years agoQrew CaptainI can help you with that code, but I feel that a more solid solution would be to count the number of children in a summary field. On the relationship between the parent and this Home Depot Children. Then have a form rule to hide the add child button if the parent already has a child. [# of Home Depot] > 0
The reason is that the user might start to add a child, but change their mind or have a power failure or be abducted by aliens just before that actually save the record. But then meanwhile that checkbox would already be checked.
That form rule is popular also in China where I believe they still have the One child rule in effect for their population of 1 Billion.. - SalesInfo7 years agoQrew Assistant Captain
- QuickBaseCoachD7 years agoQrew CaptainGo to the relationship between the parent and child and create a summary field to count the # of Home Depot Records.
Then create a Dynamic form rule using the tab on Customize this form to hide the add child button when that summary field is > 0