cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
The 'drill-into' function on the widgets will add the recently used fields (from the datasource fields and not the hierarchical members) on the context menu of the widget which may distract the users who are using it.
When there are hierarchies enabled on the widget's slicer dimension, these recently used fields for drill-into will get grouped in a sub-menu named 'Recent'. 
To remove these recently used fields' mention from the context menu, we could use the dashboard script and clear these from the context menu (stored at the widget level) during every load of the dashboard. Alternatively, this could also be done at the widget level too (using Widget scripts). 

STEP 1:

Get the widget ID of the widget (from the URL of the widget editor) that you want to remove the recently used drill-into list from. 

STEP 2:

In the script below, add the widget id you had copied from the previous step to the variable (const) 'widgetId' and paste it in the dashboard script. Click save and reload the dashboard for it to take effect. 
dashboard.on("initialized", function(el,args) {
 const widgetId = '5f3b284b09da616efcaa7c3a'; //add the widget id that you want to apply this functionality
 const widgets = prism.activeDashboard.widgets.$$widgets; // getting all the widgets of the dashboard
 widgets.forEach( function (widget, index) {
  if(widget.oid == widgetId){ //getting the widget that we need
   widget.metadata.drillHistory = []; //removing all the stored recent drill levels
  };
 });
});
Note: if you're using the script in the widget's script editor, then change the "dashboard.on(..)" to "widget.on(..)"
Good luck!
Comments
TJT
7 - Data Storage
7 - Data Storage

Is It Possible to hide Drill hierarchy for dates too.

TJT_0-1680187927493.png

 

Version history
Last update:
‎03-02-2023 09:16 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: