Articles in this section
Category / Section

How to update filters across widgets in an embedded dashboard dynamically from external application?

Published:

Bold BI supports to update the filter values on widgets in the embedded dashboard dynamically from an external application. Here is an example.


    1. Create a button in your embedded application and wire the functionality through a method with the code snippet given below. In this method, the corresponding widget instance was invoked and filter parameters passed to it. Following that, updateWidgetFilters method call invoked to refresh the embedded container.
   <button onclick="updateFilterValues()"> updateFilterValues </button>

function updateFilterValues() {                                                   

   var instance = BoldBI.getInstance("container"); //container -> embed container id

   var widgetId1 = "2583540a-f970-41a1-9fc8-31c0581e7aa3";

   var filtersValue1 = ["Customer Feedback=Good"]; 

   instance.getWidgetInstance(widgetId1).setFilterParameters(filtersValue1); // Update filters

   var widgetId2 = "fb95de77-65f8-4dfb-a010-92942b6eef4f";

   var filtersValue2 = ["Department=Cardiology","Name=Aria Cruz"]; 

   instance.getWidgetInstance(widgetId2).setFilterParameters(filtersValue2); // Update filters

   instance.updateWidgetFilters("container"); //container -> embed container id

}

    2. Click the button in the application to apply the filters across the widgets in the dashboard as shown below.


Related links:
Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
SM
Written by Soundarya Mani Meharan
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied