Dashboard - Passing Filter Values Using URL Parameters
Summary: Ophir_Buchman provides a detailed guide on how to pass filter values to a dashboard using URL parameters by employing a script. The script parses URL parameters and applies them to the dashboard filters, allowing external systems to set default values. A participant later inquires if similar functionality is possible with Periscope charts, as they encounter an issue where 'prism' is not a recognized object.
A customer may want to pass a filter value using the URL (as a parameter). A common case could be when an external system launches a dashboard and wants it to default to a specific value.
The following script allows you to parse the parameters received in the URL and apply them to the dashboard filters.
Steps:
1. Apply the following script to your dashboard:
2. Acquire the URL of your dashboard
(e.g. https://test.sisense.com/app/main#/dashboards/62a...ae1)
3. Add parameters (align with filter names):
https://test.sisense.com/app/main#/dashboards/62a...ae1?Region123=US&CountryName=Iowa
4. Refresh the dashboard and watch your filters pane:
Benjamin Nissim
·1 year agoHello Community,
I invite you to try the FREE Share Dashboard View plugin by Paldi Solutions—a simple and convenient way to pass filter values directly in the dashboard URL, eliminating the need for custom scripts.
Oleksandr Holubovych
·1 year agoTo keep the ability to pass the filter value through the URL after the L2025.1 Service Pack 1 release, use the following dashboard script:
Hamza Jap-Tjong
·2 years agoI am also curious to know how to process multiple values for a filter. Ophir_Buchman could you perhaps eloborate on how to make this possible?
Sushant_Cropin
·3 years agoI struggled a lot for the Dependent filters, here is a solution that works for me now. May save someone some time.
gyanianand
·3 years agoHow do we pass multiple values for a filter in the url
ross_hendry
·3 years ago · EditedIs this possible on Periscope charts? When I try this, or the similar knowledge base article, `prism` is not a valid object to reference.
Milan
·3 years agoHello Ophir_Buchman & Anonymous -- Any idea on the above?
Milan
·3 years agoAnother separate follow up q, how do you pass through a filter via the URL, for when a Date filter is set to "Last Month"?
Milan
·3 years agoHi Anonymous ,
I'm trying to implement this solution so I can have preset filters via dashboard urls for ease of navigation through multiple dasboards.
It appears that certain filters in the url will not pass through to the dashboard, particularly if the filter has "Include all" already preselected and default set on the dashboard.
Upon further investigation, if the filter of interest has an option selected, then the url will pass through the filter.
Is there anyway to enable the filter via url to pass through regardless of the data currently filtered on or not?
irismaessen
·3 years ago · EditedHello Milan,
(With the motto of better late than never)
https://community.sisense.com/forum/how-tos-faqs-43/topic/passing-dashboard-filters-by-url-parameters-4512/
You can always include the filter JAQL in the embed url, and set filters that way.
That article says to URL encode it, in my experience that is not always necessary (only if you have free text filters IME).
The filter JAQLs JSON.stringify retrieves using the above method is much bigger for me than the example in the article, and many of the components of the JAQL can be stripped (after some experimentation to check that the filter is still working, of course). But it *does* work.
mgkirsch
·3 years agotry adding fil.jaql.filter.all = false
Sisense User
·3 years ago[EDIT] If you have any spaces or other special characters in the filter member names that get encoded when passed in the URL, use the following dashboard script:
joanna
·2 years agoHello Anonymous,
Can you share example link where filter name and result have spaces? How to generate the dashboard link for such case?
Can we also doe multiple selected result? If so, can you share sample link as well?
Thanks
irismaessen
·4 years agoThat looks pretty useful and a lot more readable than passing the filter JAQL in the url -- but does this replace the filter JAQL method of setting filters in newer Sisense versions or is this an additional possibility?
Iris
Ophir_Buchman
OP4 years agoHi irismaessen - This is a different approach to the problem...
irismaessen
·4 years agoHey Ophir,
That's great, I'll have to investigate if this doesn't work better for us in some cases.
Thank you for the information!
jmn3
·3 years agoOphir_Buchman How would you write the filter in the URL if there are spaces in the filter name? For example say instead of Region123, the name was Region 123?
Similarly, how would you add the filter value if there are spaces in the value?