Min Su Sun Posted June 5, 2023 Share Posted June 5, 2023 I have two buttons in textarea.One button should be a function that initializes the filter only for that page,The other button should be a function to initialize all pages.In this case, how should I configure the filter?And is it possible with a script? Link to comment Share on other sites More sharing options...
Jose Leviaguirre Posted June 8, 2023 Share Posted June 8, 2023 Hello Min Not sure what you mean by initialize the filter. Do you mean set the filter to a specific value? Do you want to reset visible filters or reset all filters from a particular filtering scheme? How many filtering schemes do you have? If you have only one, all pages will be affected when resetting that one filtering scheme. If you have a different filtering scheme for each page, then you can reset the active filtering scheme Button 1. Reset filters from the active page current filtering scheme activePage = Document.ActivePageReference Document.FilteringSchemes[activePage.ActiveFilteringSelectionReference].ResetAllFilters() Button 2. Reset the selected filtering scheme from each page for page in Document.Pages: Document.FilteringSchemes[page.ActiveFilteringSelectionReference].ResetAllFilters() Reset all filtering schemes (on all pages): for scheme in Document.FilteringSchemes: scheme.ResetAllFilters() Link to comment Share on other sites More sharing options...
Jose Vargas 2 Posted February 5 Share Posted February 5 @Jose Leviaguirre do you know if you have something similar for a button to reset only visible filters across all filtering schemes? Similar to the last script in your last answer but instead of all filters I want to reset just the visible filters. Thanks! Link to comment Share on other sites More sharing options...
Jose Leviaguirre Posted February 6 Share Posted February 6 Hola Tocayo! #1. Take the filter panel from the desired page in filter panel #filterPanel = Document.Pages[1].FilterPanel filterPanel = Document.ActivePageReference.FilterPanel #1.1 Select the filtering scheme to use (optional) #filterringScheme = Document.FilteringSchemes[Document.Data.Filterings["Filtering scheme"]] #filterPanel.FilteringSchemeReference = filteringScheme #2. Reset only visible filters for tableGroup in filterPanel.TableGroups: for filterHandle in tableGroup.FilterHandles: if filterHandle.Visible: filterHandle.FilterReference.Reset() 1 Link to comment Share on other sites More sharing options...
Venkata Gopi M Posted February 6 Share Posted February 6 Hi, you can also you the default option form action control. 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