DashboardMessageHandler

The DashboardMessageHandler class allows you to define custom filtering logic for interactive publishers.

DashboardMessageHandler - DashboardMessageHandler(String id)

Instantiate a DashboardMessageHandler object with a given unique ID.

Table 1. Parameters
Name Type Description
Id String A unique ID for the filter. This ID allows report widgets to track which filter applied each filter. The ID does not need to be unique across all dashboards, but each dashboard cannot have multiple filters with the same ID.

var my_dashboardMessageHandler = new DashboardMessageHandler("my_unique_id");

DashboardMessageHandler - publishFilter(String table, String encodedQuery)

Each DashboardMessageHandler object can publish a single filter.

Publishing a new filter from the same object overwrites the original filter. Use multiple DashboardMessageHandler objects to publish multiple filters.

Table 2. Parameters
Name Type Description
table String The table to filter, such as task.
encodedQuery String An encoded query that specifies the filter to publish.
Table 3. Returns
Type Description
void

var my_dashboardMessageHandler = new DashboardMessageHandler("my_unique_id");
<input id="onlyMine" type="button" value="Only mine" 
  onclick="my_dashboardMessageHandler.publishFilter('task','caller_idDYNAMIC90d1921e5f510100a9ad2572f2b477fe');"/>

DashboardMessageHandler - removeFilter()

Removes the current filter published by this DashboardMessageHandler object from all reports on the homepage or dashboard.

Table 4. Parameters
Name Type Description
None
Table 5. Returns
Type Description
void

var my_dashboardMessageHandler = new DashboardMessageHandler("my_unique_id");
<input id="removeFilter" type="button" value="Remove filter" 
  onclick="my_dashboardMessageHandler.removeFilter();"/>