Administrators may create custom interactive filter widgets to provide advanced filtering options on dashboards.
Having multiple calls to publishFilter() does not work and when the filter is changed, the condition that was last applied (which is saved in the user preferences) becomes applicable instead of the current filter.
It is expected of multiple calls to DashboardMessageHandler.publishFilter() to not work as the second call would clear off the filter applied in the first call.
Use only one message handler and pass the filter messages in an array.
Instead of having code like this:
var dashboardMessageHandler1 = new DashboardMessageHandler();
var dashboardMessageHandler2 = new DashboardMessageHandler();
The above code should be converted to use publishMessage() function instead of publishFilter():
var handler = new DashboardMessageHandler("HANDLER_NAME");
var filter1 = handler.getFilterMessage("TABLE1", "CONDITIONS1");
var filter2 = handler.getFilterMessage("TABLE2", "CONDITIONS2");
// Use this To Publish Filter
// Use this To Remove Filter