Jump to content
We've recently updated our Privacy Statement, available here. ×
  • How to rename the Filter group/subgroups and filters in Spotfire® using IronPython scripting


    Introduction

    Below is a scripting example to rename the filter group/subgroups and filters in Spotfire.

    Code sample

    # Copyright © 2017. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
    
    #get the filter panel on the current active page
    
    filterPanel = Document.ActivePageReference.FilterPanel
    
    # Iterate over filter subgroup and rename the subgroup
    
    for tableGroup in filterPanel.TableGroups:
    	print "----" + tableGroup.Name
    	for subGroup in tableGroup.SubGroups:
    		print subGroup.Name
    		if (subGroup.Name == "Test-subGroup"):			
    			subGroup.SetName("Test-subGroupRenamed") 
    			for fh in subGroup.FilterHandles:
    				if (fh.FilterReference.Name == "Test"):
    					fh.FilterReference.Name = "TestRenamed"
                        

     

    References

     

    License:  TIBCO BSD-Style License

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...