Jump to content
  • How to collapse all the filter groups and filters in Spotfire® using IronPython scripting


    This article explains how to collapse all the filter groups and filters in Spotfire® using IronPython scripting

    Introduction

    This script collapses all the filter groups and filters in the filter panel on the active page

    Code sample

     # Copyright © 2017. TIBCO Software Inc.  Licensed under TIBCO BSD-style license.
     
     page = Application.Document.ActivePageReference
     
     filterPanel = page.FilterPanel
     
     for tableGroup in filterPanel.TableGroups:
         if (tableGroup.Expanded):
             tableGroup.Expanded = not tableGroup.Expanded
             for filterGroup in tableGroup.SubGroups:
                 if (filterGroup.Expanded):
                     filterGroup.Expanded = not filterGroup.Expanded
     

    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...