Help

Re: Interface Filter Element URL

1607 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Tristan_Scifo
6 - Interface Innovator
6 - Interface Innovator

I’ve built a client meeting interface for my team with the following elements:

  • Client record dropdown element
  • Meeting record dropdown element
  • Client Goal filter element (to filter for only the goals linked to the meeting)
  • Client Action Item filter element (to filter for only the action items linked to the meeting)

My objective is to generate an automated URL to view the interface with all 4 elements prefilled.

I’ve been able to prefil the client record and meeting record, since these only use record IDs.

However I can’t seem to identify what data type the filters utilise in their url code.

Here are some examples of one of the filter’s URL code:

0Klo0=b%3AeyJBYk5NTyI6W1swLFsicmVjWEtBdGMzQmJaY0JlaUYiXV1dfQ
0Klo0=b%3AeyJBYk5NTyI6W1swLFsicmVjR1pWRzc1OU50Q2JORDkiXV1dfQ

The bold part appears to be the value of the filtered meeting, but is clearly not a record ID.

If I can identify this value type and source the value, I can then build my desired prefilled URL formula for the interface.

Any insights or suggestions would be greatly appreciated.

T

18 Replies 18
Harry_Singh
5 - Automation Enthusiast
5 - Automation Enthusiast

I believe [Interface] Use Data to Populate Connected Filter ... - Airtable Community   is a new idea request for this to be implemented. 

einfachiso
5 - Automation Enthusiast
5 - Automation Enthusiast

Hey, 

i had the same issue and just tried a few things.

The parameter for setting the filter is

b followed by a URL encoded colon (%3A) followed by a Base 64 encoded record that looks like this in my case:

{"lmq2i":[[6,["rec5N7fBUoLjX5wh8"]]]}

In your case (eyJBYk5NTyI6W1swLFsicmVjWEtBdGMzQmJaY0JlaUYiXV1dfQ) it contains this:

{"AbNMO":[[0,["recXKAtc3BbZcBeiF"]]]}

The first element seems to identify the filter (AbNMO), don't know what the integer value indicates but then follows the record ID for the elements selected in the filter.

Hope this helps. 😃

It worked!! THANK YOU! First decoded the url after the %3A as described. Then used the script shared here to encode it with the desired recordID filled in. Thank you!!!

Could you give more details about how you did this? Are you using an Automation Script step to create the link to the interface for the record at record creation? Could you share your script if so?

olafjasiniak
5 - Automation Enthusiast
5 - Automation Enthusiast

I think I've managed to solve this:
I tested it on a "blank page" interface, it has a filter element and a grid table

When I select one element in the filter element (linked records), the URL looks like this:

https://airtable.com/{{base_id}}/{{interface_id}}?2HzwN=b%3AeyI4dGtRNiI6W1s2LFsicmVjbFpqMzhmMVhwcERUMXEiXV1dfQ   

normally, when using a record picker, the querystring looks like this: ?2HzwN={{record_id}}

Turns out, that the long string starting with "b%3Aey..." is base64 and url encoded, you can decode it using GPT4 quickly, which will give you the output of:

{"8tkQ6":[[6,["{{record_id}}"]]]}

Knowing this, you can generate the dynamic link using make.com for example. It's going to look like this:

https://airtable.com/{{base_id}}/{{interface_id}}?2HzwN=encodeURL(base64 ("{""8tkQ6"": [[6, [""{{record_id}}""]]]}"))

Tested this out manually on a couple of examples and it seems to be working, the output is a working url to the interface, which after clicking, opens the interface with a prefilled filter element

 

EDIT: I've just only now seen u/einfachiso's reply (it wasn't pinned on the first page :D). The solution seems to be the same

 

Jason_Jakarta
7 - App Architect
7 - App Architect

 Great Work! Thanks for sharing in detail. It would be nice to see Airtable help out here and make this a bit easier 🙏🏻

Very smart solution and thanks for sharing.

That said, shame on Airtable!  Navigating between Interfaces with some session data that dictates filters and other parameters is a core and common aspect of any application.  The fact that their architecture actually does support this, but that they haven't provided an INTERNAL (not requiring Make) way of executing this is baffling! 

Common use case - Interface to views a list of Clients.  After selecting a specific Client, and the Interface showing their information, I want to navigate to a different Interface that pulls up an assessment on that client (so navigate to the page and preload the filter the the correct client's assessment).  Very common!

Before these LCNC platforms can truly start to displace bespoke applications - these types of common functions must be present.

baris_art
4 - Data Explorer
4 - Data Explorer

Thanks for your answers! I implemented the link logic and was able to get the link with correct filter with script. In my case, there is still a missing point: 

I got a single interface for all clients (gallery view and record review), then put a filter dropdown and shared it as public. From the public link, I selected a client Contact from the dropdown filter and the URL for this selection has a particular pattern which I managed to reverse engineer and replicate for other clients using a script automation. So, I got an already filtered URL for each client and added it as a field in the base with  automation.

Now, the missing point is that the filter is still there, and a filtered client can still see other clients from the dropdown. I tried to remove the filter item from the interface design but after publishing it, the filtered URLs to interfaces no longer worked (went to an unfiltered view by default, after bringing the dropdown back the same URL worked well again). While I was trying earlier, I had one experiment where I found that even after removing the filter element from design, I was getting the filtered view for client which is exactly what I needed (giving a personal URL to each client without seeing other clients). I'm not sure if this successful experiment was an bug or an illusion in my case because I wasn't able replicate it afterwards. 

Please let me know if you know any solution for this case or any workarounds. Thanks! 

I think the only option would be to set up a dynamic filter for Client's email contains Current user email, but I don't think that can be done on public interfaces? Your clients would need to log in to Airtable I guess.

To do that, you'd need to set up a column of Type Email in the Clients table (it can also contain multiple emails separated with commas) for the dynamic filter to work.