Add button not taking me to the right form

  • 1
  • 1
  • Question
  • Updated 3 years ago
  • Answered

In my parent table, I have created two separate forms. Each form has two different child form to be called using the 'add' button. My expectation is that pressing this button on each form  I should be able to call a different child form. I have changed the form ids on my buttons but this still shows me the same child form when adding child record from either of these forms. Form IDs on my child table are 2 and 11. 

Following is the code behind each button: 

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

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

What am I doing wrong? 

Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb

Posted 3 years ago

  • 1
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
You are mixing up the field ID _fid_ with the form ID dfid=



URLRoot() & "db/" & [_DBID_VARIATION_ITEMS] & "?a=API_GenAddRecordForm&_fid_XX=" & URLEncode ([Record ID#]) & "&dfid=2" & "&z=" & Rurl()


You need to replace XX with the field ID number of the field typically called Related Parent.

The parameter dfid is the Form ID number.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks Mark.  Little mystified that why dfid part was missing? I merely copied the statement.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
The dfid is not normally specified when creating a record using GenAddRecirdForm.

 It is an optional parameter used to specify a different form than the default form.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks a lot.  Currently I am showing two child forms.  Is there an easier way to hide the form through form rules (instead of hiding the section)?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
I don't understand what you mean by "I am showing two forms". I thought you were building two Add Child buttons and each was going to open up a particular form.