To extend the above logic for the dropdown to dynamically display the actual Filter value, the following script improvement can be used:
widget.on('ready',(w, args)=>{
var tempFilter = 'All Items';
if (prism.activeDashboard.filters.$$items[0].jaql.filter.members) tempFilter = prism.activeDashboard.filters.$$items[0].jaql.filter.members.toString();
$('.addPlaceholder').prepend('<option value=\"\" disabled selected>'+tempFilter+'</option>');
});
The above takes the first dashboard filter values and puts them as the first item on a drop-down list. Otherwise, "All Items" is displayed.
Tested on Sisense Version: L2023.11.0.279.