Forum Discussion

SarahSarah's avatar
SarahSarah
Qrew Cadet
6 years ago

Creating a URL based on a record ID

I have an automation that creates a new record on Table B when the existing record on Table A is modified. Due to the specific report I need, I could not create a traditional relationship between these two tables so I created the automation instead. When the new record is created on Table B, it will have a field that references the Record ID of the triggering record from Table A. I would like to make a formula URL field on Table B that creates a link to the triggering record on Table A. My assumption is that I need to do this using the record ID, but I'm not sure how. 

11 Replies

  • Build a formula-URL field in your Table B:

    URLRoot() & "db/" & [_DBID_TABLE_A_ALIAS_NAME] & "?a=dr&rid=" &


  • What if the triggering table (Table A) is actually 4 different tables that all feed into Table B? Is there a way to make the table ID a dynamic value changes based on the origin of the record ID? Or would I have to make a field that populates the table ID based on the original and then feed that field into the formula?
  • You would have to pass in the DBID of the originating table to hardcode the "db/xxxxxx" of the source as well as the Record ID# of the record.  You can do this easily enough using a formula field in your Table A (4 variations) and just populate a text-value with that dbid when you create your Table B records.

    Then your formula would be:

    URLRoot() & "db/" & [Source Table DBID] & "?a=dr&rid=" & [Source Record ID#]
    • ChristopherJob's avatar
      ChristopherJob
      Qrew Trainee
      Hello Laura.

      I've been using the same formula that you have laid out, though "&dfid=11" was added after the Record ID# in my formula.  It was working for a few months but then just a week or two ago it quit working.  Below is what my formula actually looks like:

      URLRoot() & "db/bpiur66d5?a=dr&rid=" & [Record ID#] & "&dfid=11"

      Can you see anything as to why it wouldn't work?  (I've also removed the "&dfid=11" from the formula with out any luck)

      Did Quickbase make any changes as to how record ID #'s are identified?​

      ------------------------------
      Christopher Job
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Have you copied your app?  Did the table identifier change?

        If you are building a button to display the same record on an alternate form, then it is better to use this syntax

        URLRoot() & "db/" & dbid() & "?a=dr&rid=" & [Record ID#] & "&dfid=11"

        The dbid() will always return the table that you are now sitting on.  Hence it is not good practice to hard code the table ID as if you copy the app, it will fail.

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