Shared view URL filters
  • 15 Sep 2022
  • 3 Minutes to read
  • Dark
    Light

Shared view URL filters

  • Dark
    Light

After creating a share for your view you can add more filtering conditions to your records in the URL. For example, the URL https://airtable.com/shrsa57bWpEecPtzp?filter_Category=Brand%20identity will take you to a shared view where a condition is showing just the records where the “Category” field is “Brand identity”.

Users can easily remove this condition in the "Filters" menu, so you shouldn’t use this feature to hide private data. This feature does not limit what data is loaded, instead, it loads the entire original shared view, and then applies additional filtering conditions to it.

4409867173143addurlfilter.gif


How to write a URL filter

To add filtering conditions you need to add to the query string of a URL. Query strings are a developer feature of websites, but in this article we’ll explain how to use them. You can also use Airtable formulas to help construct a query string.

To build a filtering condition, first think about what you want to express in words. We’ll be building a share URL filter for this share: https://airtable.com/shrsa57bWpEecPtzp, one that represents “Category equals Brand identity and Project lead equals Cameron Toth”. Our filter has two rules:

  • Category equals Brand identity
  • Project lead equals Cameron Toth

Share URL filter condition currently only support the “equals” operator and combining condition rules with “and”.

Filtering condition rules are written in the format filter_{Field}={Value} where you replace {Field} and {Value} with your own field and value. Query strings don’t support many characters like spaces or commas so you need to URL encode your field and value.

Your title goes here
A field ID can be used instead of the field name; field IDs are a new feature and currently available through our API, or through the Field Manager (Pro and Enterprise only).

Query strings don’t support many characters like spaces or commas so you need to URL encode your field and value. You may use the input below to try URL encoding some text. You may also use the Airtable ENCODE_URL_COMPONENT() function in a formula field.

Encoded output:

Brand%20identity

So our first rule would be filter_Category=Brand%20identity because “Brand identity” has a space in it and the URL encoding for spaces is %20. Our second rule would be filter_Project%20lead=Cameron%20Toth because both “Project lead” and “Cameron Toth” have a space in them.

To combine the filter rules together into a query string you use the & symbol. For example filter_Category=Brand%20identity&filter_Project%20lead=Cameron%20Toth.

Then take your share URL, which in our case is: https://airtable.com/shrsa57bWpEecPtzp, and add a question mark (?) followed by your query string.

So, our final URL with our filtering conditions would be https://airtable.com/shrsa57bWpEecPtzp?filter_Category=Brand%20identity&filter_Project%20lead=Cameron%20Toth.

If your URL has a question mark already then that means it already has a query string. Make sure to remove the existing query string from your URL before adding a new one.

If you’re having trouble there are developers who can help on our Community Forum.


Frequently asked questions

Can I use other operators besides the equals operator? For example, to filter for orders less than $100 or for dates between January 1 and March 1?

The only operator currently supported by URL filtering conditions is equality. If you have a field with multiple values like a multiple select field, then a URL filter must exactly match one of those values. So for example if you have a multiple select “Tags” field with “Bug” and “Enhancement” options then filter_Tags=Bug will match all records that have the “Bug” tag including records that have other tags.

Can I filter through records that match one condition or another?

The shared view URL filters only support combining conditions with “and” at the moment. For more flexibility, you can create a formula field and filter based on that.

What kind of views support shared view URLs?

URL filters can be applied to Grid, Calendar, Gallery, Gantt, Timeline, and Kanban view shares.

I want to create a view to share with multiple people, but I want to filter the view for each person so they can't see the other people's records. Can I use shared view URL filters for that?

URL filters can be removed by anyone you send the link to so you shouldn’t use this feature to hide private data. Create a view in Airtable for each person and generate a share link for each group.


Was this article helpful?