1
Create a Dashboard Filter
- In your dashboard, create a new ‘Dashboard Filter’.
- In the “Apply On” section, enable the App Filter option.

2
Passing from Guest TokenBelow is a sample payload structure:Make sure the options and values match the data type of the filter for successful integration.
- You can link a guest token here to pass the filter values dynamically.
ℹ️ Token
Example Use Case:
Let’s assume you have three roles:- Admin
- Editor
- Viewer
Country: ["USA", "CANADA", "MEXICO", "CHINA", "INDIA"]
Company: ["ALPHABET", "GOOGLE", "APPLE"]
Role/Dashboard Filters | Company | Country |
---|---|---|
Admin | All Companies | All Countries |
Editor | All Companies | USA, CANADA, MEXICO |
Viewer | Alphabet | USA |
Optimizing Large Filters with SQL integration
For filters involving a large number of options (e.g., over 500), manually passing all values becomes inefficient. By integrating SQL, you can dynamically fetch options from your database, simplifying the process and improving efficiency. The SQL query specified under the “sql” key dynamically fetches the latest values from the specified database table.Example Configuration
Let’s modify the earlier example for Admin to demonstrate SQL integration for dynamically fetching filter options: Guest token for Admin with SQL Integration:Key Benefits
- Dynamic Updates: The SQL query retrieves only the latest relevant options from your database.
- Example:
<code>SELECT "name" FROM "public"."countries" WHERE isEnabled=true</code>
fetches active country names.
- Example:
- Efficiency: Eliminates the need to manually manage large datasets in the configuration.
- Flexibility: The
<code>columnName</code>
specifies the field in the query result to use as filter values. - Scalability: Handles thousands of options seamlessly, reducing payload size and improving performance.