Skip to main content
Solved

Dynamic Button Link to Open Linked Record in Interface


Hello!  TIA for any help!  I'm creating a base for Donor Management and have run into a challenge.  I'm building an interface for Fundraising Campaign tracking.  The main Interface is a Record View layout.  Potential donors are loaded into a table and then viewed via this Interface.  When you click on a potential donor, it loads their contact information and the tracking data below it, as you can see in this screenshot.  *I've removed the sensitive data!

 

Because the potential donors are linked into the campaigns, all their contact information is not editable in this Interface.  I'm generally okay with that, but I'd like to include a button that would let users open a donor's page for editing, possibly using the Contacts Interface you can see in the menu bar at the top.  Is there a way to create a link that would somehow take the ID of a linked record from the current Interface and pass it to the Contacts Interface on loading?

Thanks again for any help!

Best answer by AirBenderMarcus

The solution is very similar to what @Ron_Daniel suggested except instead of generating a link to the data layer, you will generate a link to the Interface page. To generate the URL, create a new formula field in the table you want to link to, replacing my sample URL with the actual URL from your published (not edit or preview mode) Contacts interface page. 

 

"https://airtable.com/appXXXXX/pagXXXXX?XXXX="&RECORD_ID()

 

Next, you'll want to add a Lookup field to the linked table and pull in the URL formula field you just created.

Then you can add a Button element to your Campaigns page and use the "Go to Record in URL" option. Turn off "Open in a new tab". Finally, customize the button's appearance however you want.

When clicked, it should now take you directly to the record on the Contacts page.

One note: if there are multiple linked records, meaning there are multiple URLs, the button will navigate to the last record in the list. So, if you expect multiple linked records I recommend just adding the URL lookup field to your Interface page instead of the button, because that will let the user select which campaign to navigate.

View original
Did this topic help you find an answer to your question?

14 replies

Ron_Daniel
  • Inspiring
  • 104 replies
  • January 13, 2023

Ashley,

When you open a record, in the upper right there is a little two-link chain icon representing the record's URL. If you look at the link, it has a structure of base, table, view, and record: 
https://airtable.com/appXXXXXXXXXXXXXX/tblXXXXXXXXXXXXXX/viwXXXXXXXXXXXXXX/recXXXXXXXXXXXXXX
So, in your Airtable base just make a button that has the formula 

CONCATENATE("https://airtable.com/appXXXXXXXXXXXXXX/tblXXXXXXXXXXXXXX/viwXXXXXXXXXXXXXX/" & RECORD_ID())
and have that button appear in the interface. When it is clicked, it will open up the record.
(Note: You need to replace the X's with your unique base, table, and view)

Ron_Daniel wrote:

Ashley,

When you open a record, in the upper right there is a little two-link chain icon representing the record's URL. If you look at the link, it has a structure of base, table, view, and record: 
https://airtable.com/appXXXXXXXXXXXXXX/tblXXXXXXXXXXXXXX/viwXXXXXXXXXXXXXX/recXXXXXXXXXXXXXX
So, in your Airtable base just make a button that has the formula 

CONCATENATE("https://airtable.com/appXXXXXXXXXXXXXX/tblXXXXXXXXXXXXXX/viwXXXXXXXXXXXXXX/" & RECORD_ID())
and have that button appear in the interface. When it is clicked, it will open up the record.
(Note: You need to replace the X's with your unique base, table, and view)

Hi Ron, Thanks for the quick response!  To clarify your solution:  when clicked, will the button load a table view, or an Interface with the selected record loaded?  Thanks!


Ron_Daniel
  • Inspiring
  • 104 replies
  • January 13, 2023

With this solution, the button opens up the record window in the table view. (I haven't yet gotten into the guts of interfaces to know what's capable in them.)


Hi Ashley. I'm grateful for this question because it helped me finally solve something I've been trying to work out for a bit on my own.

I think I figured it out. But before I get to that, can you clarify whether you are trying to add the button in Campaigns that links to Contacts  OR if the button should be in Contacts and then links to Campaigns?


The solution is very similar to what @Ron_Daniel suggested except instead of generating a link to the data layer, you will generate a link to the Interface page. To generate the URL, create a new formula field in the table you want to link to, replacing my sample URL with the actual URL from your published (not edit or preview mode) Contacts interface page. 

 

"https://airtable.com/appXXXXX/pagXXXXX?XXXX="&RECORD_ID()

 

Next, you'll want to add a Lookup field to the linked table and pull in the URL formula field you just created.

Then you can add a Button element to your Campaigns page and use the "Go to Record in URL" option. Turn off "Open in a new tab". Finally, customize the button's appearance however you want.

When clicked, it should now take you directly to the record on the Contacts page.

One note: if there are multiple linked records, meaning there are multiple URLs, the button will navigate to the last record in the list. So, if you expect multiple linked records I recommend just adding the URL lookup field to your Interface page instead of the button, because that will let the user select which campaign to navigate.


Ron_Daniel wrote:

With this solution, the button opens up the record window in the table view. (I haven't yet gotten into the guts of interfaces to know what's capable in them.)


Ok, I thought that was the case! So ideally, I could pre-load an Interface from a button in a different Interface.

 

I *think* I know how it works in the table views. You can use the RECORD_ID() in a formula to pull up a specific record?

I'm wondering if there’s a simile solution for interfaces?


Ron_Daniel
  • Inspiring
  • 104 replies
  • January 13, 2023
Ashley_Jackson wrote:

Ok, I thought that was the case! So ideally, I could pre-load an Interface from a button in a different Interface.

 

I *think* I know how it works in the table views. You can use the RECORD_ID() in a formula to pull up a specific record?

I'm wondering if there’s a simile solution for interfaces?


Yes, the record id shows the unique identifier for the Airtable record. That identifier is also used in the record's URL. Not sure how interfaces present their data - I'll have to dig into @AirBenderMarcus 's answer and see what I can learn


  • New Participant
  • 2 replies
  • June 22, 2023

Hey Create a button on your interface 

Action -> Copy link to record 

Publish it and copy a record 

head over to the data create a new field using formula and this is how mine looks 

 

 
now you can use this field to either create a slack link to open in interfaces

Hi, i have tried to apply what is indicated from @AirBenderMarcus but still not working.
My record url detail in the sidebar interface has a different syntax:

https://airtable.com/appXXXXXX/pagXXXXXX?detail=YYYYYYYYYYYYYYYYYYY(about 100 characters here)

 

I then tried to replace all YYYYYY with the 

"&RECORD_ID()

but when clicked, it always landing to general interface, not opening single record detail sidebar.

Can you help me?
Thanks in advance.


stefanoterreni wrote:

Hi, i have tried to apply what is indicated from @AirBenderMarcus but still not working.
My record url detail in the sidebar interface has a different syntax:

https://airtable.com/appXXXXXX/pagXXXXXX?detail=YYYYYYYYYYYYYYYYYYY(about 100 characters here)

 

I then tried to replace all YYYYYY with the 

"&RECORD_ID()

but when clicked, it always landing to general interface, not opening single record detail sidebar.

Can you help me?
Thanks in advance.


I confirm that unfortunately @AirBenderMarcus's solution works on these models only:

  • Record review
  • Record summary

I need a solution to the List interface.


  • New Participant
  • 2 replies
  • August 28, 2023
stefanoterreni wrote:

I confirm that unfortunately @AirBenderMarcus's solution works on these models only:

  • Record review
  • Record summary

I need a solution to the List interface.


edit the list view interface and select on a record and select the show as, from sidesheet to full screen. 

publish it, than copy the URL and edit out the record id at the end it should work


  • Participating Frequently
  • 5 replies
  • March 13, 2024

If you can use an Automation, the solution there can be helpful to generate links to Slidesheets details :  : https://community.airtable.com/t5/interface-designer/navigate-between-airtable-interfaces-how-to-generate-dynamic/m-p/120787#M854 


  • New Participant
  • 3 replies
  • September 27, 2024
davidkhochay wrote:

edit the list view interface and select on a record and select the show as, from sidesheet to full screen. 

publish it, than copy the URL and edit out the record id at the end it should work


Thank you! This was the solution for me.

For anyone curious, here is the formula I used in the formula field to create a link to the full screen record in the interface I wanted:
Concatenate("https://airtable.com/appXXXXXXXXXXXXXX/pagXXXXXXXXXXXXXX/" & Record_ID() & "?home=pagXXXXXXXXXXXXXX")


  • New Participant
  • 1 reply
  • January 7, 2025

I tried this, but the button gives me an error saying the URL is not formatted correctly. I tried clicking the URL directly from the data table, and it does take me to my interface, but not to the record I hoped it would...so the button is rejecting a properly formatted URL, and the URL doesn't solve the problem anyway. I've double checked that the record ID matches what is showing up in the URL.


Reply