If your spreadsheet contains lots of data and its structure is complex, it can be useful to have some of your filters already set when you load the view. It can be useful to display different versions of the same view on different pages.
1. Set up your preset filters manually
Here is a simple example below, please try reloading this page with these preset filters (and look at the URL):
- All companies that are from China
- All companies that matches to the string 'Micro'
- All companies established between 1920 and 1980
If you look at the URL of this page after reloading it with one of the links above, you will notice that it follows a specific structure:
yourURL?filter[index of your column]=your value // yourURL?filterB=Todo
Here's a guide to help you choose the appropriate Preset Filter depending on your needs (or data-type):
|StringFilter||Content of the stringfilter (text)||
Filtering for 'Yellow' in the column A :
|CategoryFilter / CsvFilter||Comma separated values.||
Filtering for company from Hotel or Activity :
|NumberRangeFilter||Two values : start and end of the range separated by a comma.||
Filtering between two numbers :
|DateFilter||Two parameters : start and end of the range separated by a comma. Dates need to be in timestamp. Use this site to convert your dates.||
Filtering between 01/01/1975 and 01/01/1980 :
Example : ?filterA=RED&filterV=USA
2. Generate automatically your preset filters
There is a second way to use preset filters with your Awesome Table view with a menu on the top right corner. It gathers ‘Clear filters’, ‘Get filtered URL’ and ‘Print’ actions.
Using this menu, you have access to the ‘Clear filters’ button, that quickly erases the current selection.
You can also use the second feature for your Awesome Table views that is ‘Get filtered URL’.
When you select this option the filtered URL is copied to your clipboard, you can paste it into a new tab to see your filetered view displayed in the awesome-table.com web app. This useful trick makes sharing filtered views possible and very easy.
3. Embed your Awesome Table view with pre-filetered URLs
It is now possible to embed your view in a website with pre-filtered URLs. Depending on where you want to embed your view, you can either use a pre-filtered URL or use an iframe with your pre-filtered URL in it.
3.1 Use the pre-filtered URL to embed your AT view
Once you have created your pre-filtered URL (as described earlier in the article) you can use it to embed your view.
3.2 Use the iframe to embed your AT view
To do so click on the sharing icon :
Select the ‘Embed’ tab.
Then, copy the iframe code> click ‘Done’:
Open a new tab and paste the iframe in the browser bar.
And copy paste your pre-filtered URL to replace the ‘src=’ between quotation marks (like in our example below).
Your iframe is now ready to be embedded in your website.