Help

Dynamic Button Link to Open Linked Record in Interface

Solved
Jump to Solution
8434 13
cancel
Showing results for 
Search instead for 
Did you mean: 
Ashley_Jackson
7 - App Architect
7 - App Architect

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!

Screen Shot 2023-01-13 at 8.32.31 AM.png

 

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!

1 Solution

Accepted Solutions
AirBenderMarcus
7 - App Architect
7 - App Architect

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.

AirBenderMarcus_0-1673640917212.png

See Solution in Thread

13 Replies 13
Ron_Daniel
8 - Airtable Astronomer
8 - Airtable Astronomer

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
8 - Airtable Astronomer
8 - Airtable Astronomer

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.)

AirBenderMarcus
7 - App Architect
7 - App Architect

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?

AirBenderMarcus
7 - App Architect
7 - App Architect

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.

AirBenderMarcus_0-1673640917212.png

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

davidkhochay
4 - Data Explorer
4 - Data Explorer

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
stefanoterreni
5 - Automation Enthusiast
5 - Automation Enthusiast

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.