Alan F Posted August 5 Share Posted August 5 Hello, everyone! I wonder is there any properties or methods to let me utilize values from document properties to set the specific range for a range filter which is from a table filter scheme and placed in the text area. I tried to use the ValueRange property but the outcome was not what I want. The original status: What I expected after executed the iron python script: Hope you can provide some methods and a completed namespace to import and simple example, which may include how to called the methods and what arguments needed. Link to comment Share on other sites More sharing options...
Solution Alan F Posted August 5 Author Solution Share Posted August 5 The problem seems fixed, thank you all for your consideration, the above issues seems due to my mistake that input wrong data data. The following code is worked: from Spotfire.Dxp.Application import Filters as filters from Spotfire.Dxp.Application.Filters import ValueRange from System import DateTime myPanel = Document.ActivePageReference.FilterPanel for filterGroup in myPanel.TableGroups: if filterGroup.Name == 'Radar Health': myFilter = filterGroup.GetFilter("DateTime") rangeFilter = myFilter.FilterReference.As[filters.RangeFilter]() startTime = DateTime.ParseExact('28/2/2023 6:02:21 pm', 'dd/M/yyyy h:mm:ss tt', None) endTime = DateTime.ParseExact('28/2/2023 6:10:07 pm', 'dd/M/yyyy h:mm:ss tt', None) rangeFilter.ValueRange = ValueRange(startTime, endTime) 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