Shri G Posted May 25, 2023 Share Posted May 25, 2023 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 More sharing options...
Shri G Posted May 25, 2023 Author Share Posted May 25, 2023 Hi @Fredrik Rosell Can you please help me with this? Link to comment Share on other sites More sharing options...
Solution Fredrik Rosell Posted June 5, 2023 Solution Share Posted June 5, 2023 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 More sharing options...
Shri G Posted June 6, 2023 Author Share Posted June 6, 2023 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 2Data 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 VisualContentfrom System import Guid#Get the active page and filterPanelpage = Application.Document.ActivePageReferencefilterPanel = page.FilterPanel# Get the FiltermyModFilter = filterPanel.FilteringSchemeReference.DefaultFilterCollection["New mod hierarchy"];hierFilter_mod = myModFilter.As[CheckBoxHierarchyFilter]();# Check all nodeshierFilter_mod.CheckAllNodes()---------------------from Spotfire.Dxp.Application.Filters import *from Spotfire.Dxp.Application.Visuals import VisualContentfrom System import Guid#Get the active page and filterPanelpage = Application.Document.ActivePageReferencefilterPanel = page.FilterPanel# Get the FiltermyModFilter = filterPanel.FilteringSchemeReference.DefaultFilterCollection["New mod hierarchy"];hierFilter_mod = myModFilter.As[CheckBoxHierarchyFilter]();# Uncheck all nodeshierFilter_mod.UncheckAllNodes()Can you please help me with your inputs on this one please?Thanks in advance! :) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now