Skip to main content

Hi!

I’m writing a script that will create a QR code that you can scan to open a record. It works to open in the data view without issue. But I need to have it go to an Interface.

If I open an interface on the desktop browser then right click on a record, then click on "copy device URL", that URL will work on the iPhone. I can paste that URL into a note and when I click it, it opens the Airtable app and goes directly to the record in the Interface. Exactly what I want.

The catch is, that URL has a bunch of extra base64 encoded stuff. I can’t figure out how to get the elementId , queryContainerId , and savedFilterSetId.

 

Using this partly redacted URL for example:

https://airtable.com/appXXXXXXXXXXXXX/pagLAWnn0AqECV5AG?detail=eyJwYWdlSWQiOiJwYWdZdkdwVG1VbXZ4eURpYyIsInJvd0lkIjoicmVjMktQeGpvbHpxc0dkV1QiLCJzaG93Q29tbWVudHMiOmZhbHNlLCJxdWVyeU9yaWdpbkhpbnQiOnsidHlwZSI6InBhZ2VFbGVtZW50IiwiZWxlbWVudElkIjoicGVsRHhZVTlPOFp3T3draTgiLCJxdWVyeUNvbnRhaW5lcklkIjoicGVsM0ltR0tBOVpQRmhqVEoiLCJzYXZlZEZpbHRlclNldElkIjoic2ZzWFc5NVNEcDhPMk1Md08ifX0

 

The end bit after the ? is the following base64 encoded:

{"pageId":"pagYvGpTmUmvxyDic","rowId":"rec2KPxjolzqsGdWT","showComments":false,"queryOriginHint":{"type":"pageElement","elementId":"pelDxYU9O8ZwOwki8","queryContainerId":"pel3ImGKA9ZPFhjTJ","savedFilterSetId":"sfsXW95SDp8O2MLwO"}}

 

I tried using an abbreviated version and that works on desktop, but not on iPhone:

{"pageId":"pagYvGpTmUmvxyDic","rowId":"rec2KPxjolzqsGdWT","showComments":false}

 

TLDR; how can I find the elementId , queryContainerId , and savedFilterSetId for a specific record in an Interface?

Or, maybe there’s just an easier way to get a URL to a record in an interface in a script that will work on an iPhone? :) 


Hmm, so you’re trying to dynamically create links for different element, queryContainers etc? 

Because if it’s just for the same page, I was wondering whether just changing the rowID worked?

{"pageId":"pagYvGpTmUmvxyDic","rowId":"ICHANGED]","showComments":false,"queryOriginHint":{"type":"pageElement","elementId":"pelDxYU9O8ZwOwki8","queryContainerId":"pel3ImGKA9ZPFhjTJ","savedFilterSetId":"sfsXW95SDp8O2MLwO"}}

 


Turns out I was trying to make this harder than it is. There just doesn’t seem to be any good documentation on the page record URL token. At least I’m not having luck finding it :) 
But, this works perfectly.

https://airtable.com/appL2oaKxSWg9qz8y/shrRJg0xh1jFLLcHF/tblsACnGQp6OOGNJl/viwgg52Z2wKCCt3Bq/recAWpMNXClTRj1iR?layout=card&viewControls=on

 

  • Add an input:
  • Then import it into the script:
let inputConfig = input.config();
  • and then use it later:
let recordUrl = `${inputConfig.pageID}`; // URL to open the record in an Interface

This works perfectly. It opens the correct record in the correct interface even on an iPhone.


Reply