Creating a URL based on a record ID

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • In Progress
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. 
Photo of Sarah

Sarah

  • 202 Points 100 badge 2x thumb

Posted 2 months ago

  • 0
  • 1
Photo of QuickBasePros_IDS

QuickBasePros_IDS, Champion

  • 4,414 Points 4k badge 2x thumb
Build a formula-URL field in your Table B:

URLRoot() & "db/" & [_DBID_TABLE_A_ALIAS_NAME] & "?a=dr&rid=" & [Table A  Triggering Record ID#]


(Edited)
Photo of Sarah

Sarah

  • 202 Points 100 badge 2x thumb
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?
Photo of QuickBasePros_IDS

QuickBasePros_IDS, Champion

  • 4,414 Points 4k badge 2x thumb
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#]