Forum Discussion

DavidBrogdon's avatar
DavidBrogdon
Qrew Assistant Captain
7 years ago

Do I need the ""GenAddRecord"" in 'add (child)' button formula ?

If I am targeting a specific custom form for the new record, do I really need the GenAddRecord part in the following formula?

URLRoot() & "db/" & [_DBID_ID] & "?a=API_GenAddRecordForm&dfid=10&_fid_15=" & URLEncode ([Record ID#])& "&z=" & Rurl()

I noticed if I just use the url of the actual form in place of the genaddrecord it still goes through to the form just fine. So, do I actually need that part?

New to these URL formulas, thanks for any insight.
  • I have put an app in the Exchange called URL Formuals for Dummies.  It helps explain these URL formuals.

    I will brerak down your code

    URLRoot()  // that means mycompany.quickbase.com

    & "db/" // you will see that in almost every Quick Base URL


    & [_DBID_ID] // this identifies which table in your app 

    & "? //this tells the internet that parameters follow and just deliver the parameters to the website (ie Quick Base)


    a=API_GenAddRecordForm  // this is an API to put up and Add Record form.


    &dfid=10  /this say to use firm ID# 10 in place of the default form.

    &_fid_15=" & URLEncode ([Record ID#]) // this says to preload into field ID the value of Record ID# from the Parent Record that you launched off if.

    & "&z=" & Rurl() //   that means that upon save to return to where you launches from instead of displaying the newly created record.

    so yes, you need to specify which API you are calling when you call an API.
    • DavidBrogdon's avatar
      DavidBrogdon
      Qrew Assistant Captain
      Thanks for taking the time to explain this. My colleague created this formula out of mine and it still works, I played around with it to confirm. Can you tell me why it works without the GenAddRecord? 

      URLRoot() & "db/" & [_DBID_PO_ITEMS] 
      & "?a=nwr&dfid=10"
      & "&_fid_15="& URLEncode ([Record ID#])
      & "&z=" & Rurl()

  • This piece here

    "?a=nwr&

    says

    NeWRecord

    nwr means new record, so its just short form for that particular API

    It's probably some legacy code for adding a new record and then they turned it also into a proper looking api.