Forum Discussion

jrossausiscom's avatar
jrossausiscom
Qrew Assistant Captain
5 years ago

URL Button, Create one record in 3 tables

Is it possible to add records to more than one table with a URL button?  Below is a generic example of what I was trying to do:

//Create a record in Device Config Records, then load in the data.  PRIMARY
(URLRoot() & "db/" & [_DBID_CONFIG] & "?a=API_AddRecord&_fid_6=" & URLEncode ([Staging ID])

//Create a record in Financial Records, then load in the data

(URLRoot() & "db/" & [_DBID_FINANCIAL] & "?a=API_AddRecord&_fid_6=" & URLEncode ([Staging ID])

//Return to Staging Request
& "&rdr=" & Dbid() & URLEncode("?a=er&rid=") & URLEncode ([Staging ID])​

​The error I receive says "there are extra characters beyond the end of your formula".  I presume I am using the wrong syntax?



------------------------------
John Ross
------------------------------
  • Here is the syntax for nest successive URL calls.  Define the URLs as formula variables.

    and then 

    $URLONE
    & "&rdr=" & URLEncode($URLTWO)
    & URLEncode("&rdr=" & URLEncode($URLTHREE))
    & URLEncode(URLEncode("&rdr=" & URLEncode($URLFOUR)))
    & URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLFIVE))))

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • jrossausiscom's avatar
      jrossausiscom
      Qrew Assistant Captain
      Interesting.  I am creating the variables now.

      What is the difference between URLEncode and URLRoot?

      ------------------------------
      John Ross
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        I completely different things.URLRoot()

        Will provide the string mycompany.quickbase.com

        URLEncode Takes care of the issue that in the Internet certain characters are not allowed including spaces and many of the characters on the top row of the keyboard. They are illegal characters for the Internet. So they need to be URLEncoded.

        As for why the syntax needs to be nested like that, I have no idea about somehow I figured that out about 15 years ago and it has always worked solidly for me.


        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------