tag:blogger.com,1999:blog-1078032318127767231.post271021887632974003..comments2024-03-20T01:42:16.872-05:00Comments on Spotfire Developer: Filtering Schemes (current, all, add, set and other tricks)Jose Leviaguirrehttp://www.blogger.com/profile/12377756211132280060noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-1078032318127767231.post-57795949348063458822017-12-04T08:15:49.462-06:002017-12-04T08:15:49.462-06:00Hello Ameet,
Try this code:
tableGroups = Docum...Hello Ameet, <br /><br />Try this code:<br /><br />tableGroups = Document.ActivePageReference.FilterPanel.TableGroups<br />for tableGroup in tableGroups:<br /> for filterHandle in t.FilterHandles:<br /> filter = filterHandle.FilterReference<br /><br /> #print available filters (and visibility status)<br /> print '[',tableGroup,'].[',filter.Name,'].Visible = ',h.Visible<br /><br />More information here: http://spotfired.blogspot.com/2014/08/reset-visible-filters.htmlJose Leviaguirrehttps://www.blogger.com/profile/12377756211132280060noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-17752777933934315442017-12-04T05:50:56.632-06:002017-12-04T05:50:56.632-06:00Hi All,
I wanted to get the coulmn Name of the A...Hi All,<br /><br />I wanted to get the coulmn Name of the Active filters available in the Current Page..Anonymoushttps://www.blogger.com/profile/11799636770612263609noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-90582767856700266922017-06-06T15:22:04.269-05:002017-06-06T15:22:04.269-05:00Hi Digvijoyee,
I saw your post and I am actually l...Hi Digvijoyee,<br />I saw your post and I am actually looking for the same kind of code. I have a filtering schema. I need to capture the some of the filter values to change the cross table value axis formulas based on which filter values they have selected and apply same filtering changes to another schema. Can you please share code that applies one filtering schema changes to another filtering Schema after clicking a button. My analysis has bunch of filtering schema's but I wanted 2 of them needs to be in synch.<br /><br />Thanks,<br />SuneethaAnonymoushttps://www.blogger.com/profile/18329822149895162139noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-24602542833665644542017-05-15T10:18:50.879-05:002017-05-15T10:18:50.879-05:00Thank you Hayden! I fixed to code with your sugges...Thank you Hayden! I fixed to code with your suggestions.Jose Leviaguirrehttps://www.blogger.com/profile/12377756211132280060noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-69643698689786309812017-05-14T22:35:43.234-05:002017-05-14T22:35:43.234-05:00Hello! This is really old but just wanted to post ...Hello! This is really old but just wanted to post a follow up for anyone else using this as a resource. The reason for the "AttributeError: 'FilteringScheme' object has no attribute 'Name'" error occurs is because a "FilteringScheme" object does not have a "Name" property. To get what you are looking for you simply need to change:<br />for scheme in Document.FilteringSchemes: <br /> print scheme.Name<br /><br />To:<br />for scheme in Document.FilteringSchemes: <br /> print scheme.FilteringSelectionReference.Name<br /><br />Cheers!<br /><br />Haydenhaydenriddhttps://www.blogger.com/profile/16267963685477932519noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-11859030238388893872015-08-10T04:48:54.327-05:002015-08-10T04:48:54.327-05:00Hi Jose,
Thanks !!
Actually I just wanted to cha...Hi Jose,<br /><br />Thanks !!<br /><br />Actually I just wanted to change filter values of a filtering scheme by changing filter values of a different filtering scheme and the different scheme I had already created.<br /><br />But any how I created one solution to do this. The only thing is that I had to create a new tab and thiis didn't become an issue for me as mine is a guided analysis dashboard.<br /><br />Below is my code (the filter in code is the Date filter (column name is Date):<br /><br />--------------------------------------------------------------<br /><br />import Spotfire.Dxp.Application.Filters as filters<br /><br />i=0<br /><br />for scheme in Document.FilteringSchemes:<br /> if (i==1):<br /> for item in Document.Pages:<br /> if (item.Title=="Test Page DO NOT DELETE OR RENAME !!!"):<br /> item.FilterPanel.FilteringSchemeReference=scheme<br /> i=i+1<br /><br />myfilter=item.FilterPanel.TableGroups[0].GetFilter("Date").FilterReference.As[filters.ListBoxFilter]()<br />myfilter.IncludeAllValues= False<br />myfilter.SetSelection(Document.Properties["Date"])VjoyeeRockshttps://www.blogger.com/profile/13941434297793782750noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-72898512079819104472015-08-09T10:00:35.205-05:002015-08-09T10:00:35.205-05:00Hello Digvijoyee,
try:
Spotfire.Dxp.Applicatio...Hello Digvijoyee, <br /><br />try:<br /><br /> Spotfire.Dxp.Application.Filters.FilteringSchemeCollection["yourfilterschemename"]<br /><br />Documentation here:<br />https://docs.tibco.com/pub/doc_remote/spotfire/6.5.0/api/?topic=html/N_Spotfire_Dxp_Application_Filters.htmJose Leviaguirrehttps://www.blogger.com/profile/12377756211132280060noreply@blogger.comtag:blogger.com,1999:blog-1078032318127767231.post-37809981098025265222015-08-09T09:25:38.857-05:002015-08-09T09:25:38.857-05:00For listing all filtering schems, on writing the s...For listing all filtering schems, on writing the syntax and running, I get below error:<br /><br />AttributeError: 'FilteringScheme' object has no attribute 'Name'<br /><br />My requirement is to change filter values of another filter scheme, that which is currently hidden and is also no the default one, by clicking a button and using iron python.VjoyeeRockshttps://www.blogger.com/profile/13941434297793782750noreply@blogger.com