Help

Re: URL Parameter for filter on a view

3664 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Bob_Perez
4 - Data Explorer
4 - Data Explorer

Newbie question here! I searched the forum and couldn’t find what I needed.

Wondering if it’s possible to share a read only link to a view with a URL parameter that filters to only show the records that match the parameter value?

Specifically, we have a field called “Group ID” that serves as a parent/master identifier that we use to group records together. I would like to share a read-only link with the Group ID value added on the end as a parameter. The viewer would then only be able to view records that had that particular Group ID. I’m able to dynamically generate the URL and send each time with a different Group ID and only want the viewer to see the records for that Group ID referenced in the URL they received.

The general idea is: www.airtable.com/viewid/?groupid=123456 would only show records that had a value of “123456” for the Group ID field.

I’m not sure how to set up the view and/or field or how to structure the URL :frowning:

From what I see hints of, this can be done but I couldn’t find specifics. Can someone point me in the right direction?

Thanks

11 Replies 11

Dynamically driving view filters is possible. In fact, the primary view in my personal task system is effectively a dynamic filter that is constantly updating throughout the day to show me different groups of tasks based on specific criteria.

For example, in the morning, I start out by only seeing a collection of tasks that are part of my morning routine. Part of that routine involves arranging the primary tasks in my day into defined time-based groups: AM, PM, and evening. Once time-group assignment is done and I complete the task that’s tied to it, the tasks for the AM group become visible. The tasks for the PM and Eve groups only appear at their assigned times throughout the day. While all of this goes on, I never touch the filter because it’s targeting a single formula field that is reacting to what’s happening with a bunch of other fields, most of which are other formula fields or rollup fields (and those rollups are most often pulling from more formula fields in other tables).

During the short stretch of time in early 2020 when I was working full-time, I updated the system to allow me to switch between completely different collections of tasks—personal and work in my case—with a single click, all still run through the same filter targeting the same formula field.

So yes, dynamic filters are possible. It’s just a matter of designing a system to support them.

Absolutely, but you still have to predefine those conditions and there isn’t an easy way to jump to a custom filtered view. Not in the way Airtable allows you to do it with URL params for shared views.

When I say ‘dynamic filtering’, I’m talking about a filtered, non-shared view based on new data and without having to create or edit new views.

For example, when a new record appears in one table, and you want to query and display some results in a different table according to the data in the new record.

I was able to stitch together a solution that works like this:

  1. Airtable button directs the user to a URL including a URL parameter for the Airtable Record ID

The webpage posts an Airtable Webhook including the Record ID
The webpage redirects the user to the URL for the Airtable filtered view (filtered according to some markers to be set in the next step)

  1. The Airtable Automation is triggered by the Webhook from the previous step

Airtable gets the original table record using the Record ID,
Script queries another table for required conditions
Script adds markers to found records (And we filter for these marker fields in the view we redirected the user to)

A few extra steps are needed to make it work smoothly, such as a time delay in the web page script and the clearing of some field values in the automation, but you get the gist.

While it is a bit hacky, it can be used to display a dynamically filtered view in one table, using any set of data from a different table, and the user only has to click one button.

I got the idea from one of your other posts. You suggested that the user click a checkbox that triggers an automation, adds the marks to found records on the other table and ultimately shows the filtered records inside the records list app. That worked great but I wanted my users to go directly to a view where they could immediately start editing. Hence the need for using some javascript on a web page.

Thanks for helping me get through it!