Dashboard - Passing Filter Values Using URL Parameters
Published 06-09-2022
To keep the ability to pass the filter value through the URL after the L2025.1 Service Pack 1 release, use the following dashboard script:
dashboard.on('initialized', function(scope, args) {
// Get Parameters
urlParameters = decodeURIComponent(window.location.href.substring(window.location.href.indexOf('?')+1)).split('&');
// Parse Parameters
parameters = new Map();
urlParameters.forEach(function(param) { parameters.set(param.split('=')[0],param.split('=')[1]) })
args.dashboard.filters.$$items.forEach(function(fil) {
if (parameters.get(fil.jaql.title) !== undefined)
{
fil.jaql.filter.explicit = true
fil.jaql.filter.userMultiSelect = true
fil.jaql.filter.members = [parameters.get(fil.jaql.title)]
}
})
})