Jump to content
We've recently updated our Privacy Statement, available here. ×

Reset Filters


Shri G
Go to solution Solved by Fredrik Rosell,

Recommended Posts

Hi All,

I have a Default Filter and Reset Filter buttons in my dashboard. I have created bookmark and have used it for default filter button. For Reset Filter, I have used in-build function.

Now I have to remove duplicates from data hence based on date column I have created new custom column. I have to set value as "True" for this column. I am able to update bookmark for Default filter for this new custom column but for "Reset Button", It is showing all. This new column value should be set as selected for reset button also.

Can somebody please help me with this?

Thanks in advance!

Shri

Link to comment
Share on other sites

  • 2 weeks later...
  • Solution

Hello,

In case the issue remains, if I understand you correctly (there is some speculation on my part), in your Reset Filter, you have used the built-in "Reset All Filters" function. That will also reset the filtering on your custom column for removing duplicates, and you are now looking for ways to avoid that.

Some options:

1. Could you remove the duplicates from data as part of the import so there is no need for your custom column/post-import filtering of duplicates.

2. Could you hide your custom column, and use "Reset all Visible Filters" for your button.  

3. Could you handle the filter reset in script using IronPython, not resetting the custom column.

4. If the duplicate filtering could be done in a particular plot instead, use Data > Limit data using expression on that plot instead 

Link to comment
Share on other sites

Thank you so much @Fredrik Rosell​  for this as well. It is working now.

I have a small doubt. I have two different data sets in my report. Page 1 having data set 1 and page 2 having data set 2

Data set 1 is set as default Data Set. I have accordion hierarchy filter for which I have created 2 buttons - Select All and Deselect All.

These Select All and Deselect All buttons python script is working for default data set data only and not for other data set. Whenever I click on Select All or Deselect All of Page 2(Data Set 2), It is working for Page 1 filters.

Script:

from Spotfire.Dxp.Application.Filters import *

from Spotfire.Dxp.Application.Visuals import VisualContent

from System import Guid

#Get the active page and filterPanel

page = Application.Document.ActivePageReference

filterPanel = page.FilterPanel

# Get the Filter

myModFilter = filterPanel.FilteringSchemeReference.DefaultFilterCollection["New mod hierarchy"];

hierFilter_mod = myModFilter.As[CheckBoxHierarchyFilter]();

# Check all nodes

hierFilter_mod.CheckAllNodes()

---------------------

from Spotfire.Dxp.Application.Filters import *

from Spotfire.Dxp.Application.Visuals import VisualContent

from System import Guid

#Get the active page and filterPanel

page = Application.Document.ActivePageReference

filterPanel = page.FilterPanel

# Get the Filter

myModFilter = filterPanel.FilteringSchemeReference.DefaultFilterCollection["New mod hierarchy"];

hierFilter_mod = myModFilter.As[CheckBoxHierarchyFilter]();

# Uncheck all nodes

hierFilter_mod.UncheckAllNodes()

Can you please help me with your inputs on this one please?

Thanks in advance! :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...