Super Filter¶
Overview¶
The Super Filter layout provides a simple method for filtering common column values across multiple tables.
Setup¶
- In the layout which you want to use the super filter layout, include the SuperFilter.layout file through the Included Layouts panel.
- Open the SuperFilter.layout file, and use the SuperFilter window to pass in a mapping json (see JSON Config) and its corresponding mapping id.
-
Open your layout and attach a new data model with the following script:
Where PANELNAME is the name of the panel containing the super filter and MAPPINGID is the earlier created id. (4). Create a new panel in your layout with the name PANELNAME, and attach a table visualization on top of the previously created data model. If everything has been setup correctly, you should see a table `SEARCH FIELDS` containing your column names.
-
Finish creating the panel and open the AMISCRIPT callbacks, on the onFilterChanging() tab, add the following line:
-
Submit your changes and the filters on the super filter should affect the target tables.
JSON Config¶
Supported Usage¶
On all column types, you can use any of the following syntax for searches
Input | Check |
---|---|
100 | Equality check |
word | Equality check |
>100 | >=100 numerical check |
>=100 | >=100 numerical check |
\<100 | \<=100 numerical check |
\<=100 | \<=100 numerical check |
100-200 | >= 100 && \<= 200 numerical check |
a|b|c | string in "a" "b", or "c" check |