Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Multiple Content Block issue in Dashboard

Preksha Kapoor
Tera Contributor

We are creating a Dashboard where we want to use Multiple content block which are able to filter the data but ones we are adding a new filter there . The first added filter stops working.

 

Attaching the screenshot of the Dashboard:

PrekshaKapoor_0-1744359207780.png

Code used in genral where we are only updating the "filter_message.filter = "serial_numberLIKE" + value;" field we want to use for search for ex,here it is being used for Serial Number search so  "serial_numberLIKE" is added there

 

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
&lt;script&gt;
var my_dashboardMessageHandler = new DashboardMessageHandler("my_unique_id");

function publishFilter () {
var filter_message = {};
filter_message.id = "my_unique_id";
filter_message.table = "alm_asset";
var value = gel('cfShortDescription').value;
filter_message.filter = "serial_numberLIKE" + value;
SNC.canvas.interactiveFilters.setDefaultValue({
id: filter_message.id,
filters: [filter_message]
}, false);
my_dashboardMessageHandler.publishFilter(filter_message.table, filter_message.filter);
}

function clearFilter() {
var filter_message = {};
filter_message.id = "my_unique_id";
filter_message.table = "alm_asset";
filter_message.filter = "";
gel('cfShortDescription').value = '';
SNC.canvas.interactiveFilters.setDefaultValue({
id: filter_message.id,
filters: [filter_message]
}, false);
my_dashboardMessageHandler.removeFilter();
}
&lt;/script&gt;

Serial Number:
<input id="cfShortDescription" type="input" value="" /><br/>
<input id="removeCustomFilter" type="button" value="Clear" onclick="clearFilter();" />
<input id="addCustomFilter" type="button" value="Search" onclick="publishFilter();" />

</j:jelly>
1 REPLY 1

Sagar Shankar
Tera Contributor

I’m experiencing the same issue. Does anyone know the solution?