Filter values validation alert popup

Hello Helical Insight,
I am Using Helical Insight enterprise version 4.1 GA. In the Dashboard filter dropdown have default selected value is _all_

We want to show user an alert popup with some message if the user clicks on submit button without changing filter values.

Can something like that be done?

Thank You,
Jam

Hello Jam,

Steps to be followed :

Let us say we have created a Dashboard which contains filter1 : travel_type , filter2: destination. We are implementing validation of travel_type filter

Open dashboard in edit mode, provide below js code in JS place holder. In the # you will have to mention the divid of the respective filter. You can find that by inspecting it.

$( "#96imunmkbsm" ).click(function() {

var filter1= Dashboard.getVariable('travel_type');

if(filter1.includes("_all_")){

"Please select Travel Type");

}

});

If user keeps all value then clicks on submit button then it shows alert ‘Please select Travel Type’
image

Thank You,
Helical Insight