Hello Netta,
You can please follow the steps mentioned below.
STEPS TO ENABLE THE SUBMIT BUTTON AT SINGLE CLICK:
-
Create a SUBMIT button (Dashboard designer > Objects >Web components>Button
- At triggers we should not select anything
- Display name should be given (Ex : submit)
- Save it.
-
At the given filters on dashboard make sure that listeners (Click on the edit >listeners on the right click of those filters) should be none and the input should be specified, which basically means that the filters are not listening to anything but they as passing values to some dashboardvariable.
-
All the reports which should get updated when a person clicks on “Submit” button collect the CSS ids of those respective reports. (Right click on report > Advanced >CSS > Enable > Component id: Ex : 4ppqozxjxoi)
-
Collect the CSS id from the submit button (Right click on submit> Advanced >CSS > Enable > Component id: Ex: uf4lb0x4mjm)
-
From the dashboard designer, to the left you will find a JS Editor. Click on the JS Editor and inject the following code:
Code :
$( "#uf4lb0x4mjm" ).on( "click", function() {
setTimeout(function() {
Dashboard.updateComponent('4ppqozxjxoi');
Dashboard.updateComponent('53431erewrei');
}, 1000);
});
Note : In the above code “#uf4lb0x4mjm” is the CSS id of submit button and “4ppqozxjxoi” ‘53431erewrei’ ‘2padjkdjfi’ is the CSS id of report which is to be updated. More and more such lines can come based on how many reports are to be updated when clicked on Submit Button. Replace these id’s with your Component id.
6. Save the JS code (Save option is present at top right corner of JS Editor).
7. Refresh the dashboard…and it will work.
Thank You,
Helical Insight.