Locking filter
Answeredwith filter.update i can change filter before load widgets.
Example:
dashboard.filters.update(
{
jaql: {
dim: "[country.Country]",
filter: {
"multiSelection": true,
"members": ["Andorra", "Afghanistan"]
}
}
});
I want to lock filter with this params for viewers. How can i do that? ~~
-
How to do that https://documentation.sisense.com/locking-filters/ with javascript (sisenseJS)?
-
Is it possible to specify which filters are locked, or do you have to lock all of them?
Actually, I figured out that you can specify which filter to lock by adding in an if clause if you specify which filter you want by the order they appear (where the first filter is index = 0).
This has been particularly useful for us when filtering on dashboards that are only accessible via the jump to plugin since those filters are automatically carried through from the source dashboard.
dashboard.on("refreshend", function(dash, args){
$.each(dash.filters.$$items, function(index, item){
if (index === 0) {
item.locked = true;
}
});});
Please sign in to leave a comment.
Comments
4 comments