Custom Interactive filter not working
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2023 03:17 AM
The dashboard is based on the 'task_time_worked' table, and I want to filter it by task type. But this filter is not working.
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 02:18 PM
Hi, replace your filterTaskType() function content with this
var filter_message = {};
filter_message.id = "filter_tasktype"; //the unique id for your message handler;
filter_message.table = "task_time_worked";
filter_message.filter = "";
var taskType = $j("#filter_task_type").val();
if (taskType) {
filter_message.filter = "task_sys_class_name=" + taskType;
}
//Need to call this to make the interactive filter work
SNC.canvas.interactiveFilters.setDefaultValue(
{
id: filter_message.id,
filters: [filter_message],
},
false
);
if (taskType) {
dbh.publishFilter(filter_message.table, filter_message.filter);
} else {
dbh.removeFilter();
}
Also, in the future please paste the code along with a screenshot. That will make answering your question easier.
Cody