Discussions

Expand all | Collapse all

Create a button that once is clicked, the checkbox from another field is checked

  • 1.  Create a button that once is clicked, the checkbox from another field is checked

    Posted 01-11-2019 13:41
    I have a button that is linked to another table. I want another field, which is a checkbox, is checked once the button is clicked. Please see below for a formula of the button

    URLRoot() & "db/" & [_DBID_HOME_DEPOT] & "?a=API_GenAddRecordForm&_fid_6=" & URLEncode ([Record ID#])& "&z=" & Rurl()

    Please help
    Thank you!


  • 2.  RE: Create a button that once is clicked, the checkbox from another field is checked

    Posted 01-11-2019 13:46
    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.


  • 3.  RE: Create a button that once is clicked, the checkbox from another field is checked

    Posted 01-11-2019 13:50
    I 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!


  • 4.  RE: Create a button that once is clicked, the checkbox from another field is checked

    Posted 01-11-2019 13:55
    I 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..


  • 5.  RE: Create a button that once is clicked, the checkbox from another field is checked

    Posted 01-11-2019 14:27
     QuickBaseCoach App Dev./Training,

    Can you please show me specific steps? 

    Thank you!


  • 6.  RE: Create a button that once is clicked, the checkbox from another field is checked

    Posted 01-11-2019 14:44
    Go 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