Step 1:
Create a Dashboard Filter
In your dashboard, create a new âDashboard Filterâ.
In the "Apply On" section, enable the App Filter option.
Step 2:
Passing from Guest Token
You can link a guest token here to pass the filter values dynamically.
Refer the below document to generate a guest token.
{
"clientId": "id",
"workspaceName": "workspacename",
"params": {
"dashboardAppFilters": [
{
"dashboardId": "dashboard-id",
"values": {
// single string
"name": "Eric",
// multi select
"country": ["USA", "CANADA"] || "USA", // based on filter variant(select or multi select)
// date-picker
"timePeriod": { "startDate": "2024-01-01", "endDate": "2024-3-23" },
// range
"price": { "min": 1000, "max": 5000 }
}
"isShowOnUrl": true, // true/false
}
]
}
}
Make sure the options and values match the data type of the filter for successful integration.
Example Use Case:
Letâs assume you have three roles:
And two Dashboard Filters:
Country: ["USA","CANADA","MEXICO","CHINA","INDIA"]
Company: ["ALPHABET","GOOGLE","APPLE"]
And below is the access level of each role:
Role/Dashboard Filters
Company
Country
Now using the information from the table above, you can input the values to generate a guest token according to the specified role.
Guest token for Admin:
{
"clientId": "id",
"workspaceName": "workspacename",
"params": {
"dashboardAppFilters": [
{
"dashboardId": "dashboard-id",
"values": {
"client": ["ALPHABET","GOOGLE","APPLE"],
"country": ["USA","CANADA","MEXICO","CHINA","INDIA"]
}
"isShowOnUrl": true, // true/false
}
]
}
}
Guest token for Editor :
{
"clientId": "id",
"workspaceName": "workspacename",
"params": {
"dashboardAppFilters": [
{
"dashboardId": "dashboard-id",
"values": {
"client": ["ALPHABET","GOOGLE","APPLE"],
"country": ["USA","CANADA","MEXICO"]
}
"isShowOnUrl": true, // true/false
}
]
}
}
Guest token for Viewer:
{
"clientId": "id",
"workspaceName": "workspacename",
"params": {
"dashboardAppFilters": [
{
"dashboardId": "dashboard-id",
"values": {
"client": ["ALPHABET"],
"country": ["USA"]
}
"isShowOnUrl": true, // true/false
}
]
}
}