Jump to content
  • How to remove filters from a Sub group in Filter Panel in Spotfire® Using IronPython Scripting


    This article shows how to remove filters from a Sub group in Filter Panel in Spotfire® Using IronPython Scripting

    Introduction

    Below is a sample script on how to remove filters from a sub group in filter panel

    Code Sample

    # Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license.
    
    from Spotfire.Dxp.Application.Filters import *
    
    filterPanel = Document.ActivePageReference.FilterPanel
    for tableGroup in filterPanel.TableGroups:
    	print "----" + tableGroup.Name
    	for subGroup in tableGroup.SubGroups:
    		print subGroup.Name
    		fh=subGroup.FilterHandles
    		for f in fh:
    			tableGroup.Add(f.FilterReference)
    		subGroup.ClearFilters()
    		tableGroup.Remove(subGroup)
    		tableGroup.SortMembersAscending()
     

    References

     

    License:  TIBCO BSD-Style License

    Back to IronPython Scripting in Spotfire Examples:  https://community.spotfire.com/s/article/IronPython-Scripting-in-Spotfire


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...