In this article, we'll cover two ways to set up filters for your Airtable listing.
- Create filters automatically by using single or multiple select fields
- Manually create a table in your Airtable base with all the filterable options
Which set up should I use?
- The fields I want to filter by are all either single or multiple select fields
Pory will be able to retrieve all the options from your fields automatically and keep it up to date. This is the preferred method.
- The fields I want to filter by are a mix of selects and other field types like linked records
You will need to set up a separate table in your Airtable base to store your filter options.
Creating filters using Select Fields
Pory is able to sync options from the fields you want your users to filter by if they are all either single or multiple select fields like the table pictured below.
- Click on Edit Listing by hovering over the listing and select Airtable Setup from the top navigation.
- Select the Filters Setting tab and set your method to Generate using single or multiple select fields.
- From the list of available options, select the fields you want to set as filters for your users.
- Select a default matching condition per filter category (detailed information below)
- Click Save and continue and return back to the editor
In this example, we'll look at a listing with 3 filters created
- Click on the X to remove the selected fields and then select them in the order you want them to appear in
- Click Save and continue and return back to the editor. You will now now see the filters in the new order.
Ordering Filter Options
- Go to Airtable
- Right click on the field and select customize field type. Drag and drop the options to reorder
Fetching filter options from Table
The filter table requires two fields, Name and Field Name in order for Pory to determine what to show as filters on your site. Field names are case sensitive.
Suppose we have a table and we want our users to be able to filter by Locations
- Create a table (you can name it what ever you want), we named it Expert Filters
- Add all the available options in the Name and add Locations for all the options in the Field Name field.
- In Pory, go into Edit Listing, witch to the Filters Settings tab and select Fetch from table as your method.
- Select your table. In our case, it is the Experts Filters.
- Click Save when you are done
Default Matching Condition
By default Pory will return records that match any of the selected filters. The two conditions supported includes:
- Match records by all selected filters (the AND clause)
- Match any of the selected filters (the OR clause)
To update the condition:
- click on Edit Listing and select Airtable Setup on the top navigation
- Switch to the filter Settings tab and set the default matching condition
- Click Save and return back to the editor