Jump to content
We've recently updated our Privacy Statement, available here. ×
  • How to rename Calculated Value column of a Graphical Table in Spotfire® Using IronPython Scripting


    This article provides a  sample script to rename a CalculatedValue column of a Graphical Table Visualization

    Introduction

    This article provides a  sample script to rename a CalculatedValue column of a Graphical Table Visualization

    Code Sample

    # Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license.
    
    from Spotfire.Dxp.Application.Visuals.Miniatures import GraphicalTable
    from Spotfire.Dxp.Application.Visuals import VisualTypeIdentifiers
    
    newColumnName = Document.Properties['fromProperty']
    #add a script parameter "gtable" referring to the Graphical Table
    columnsList=gtable.As[GraphicalTable]().Columns
    for column in columnsList: 
     #Calculated Value Columns
     if column.Visualization.TypeId == VisualTypeIdentifiers.CalculatedValueMiniatureVisualization:
      if column.Title=="oldColumnName":
    	column.Title = newColumnName
     

    References

    License:  TIBCO BSD-Style License

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

     

     


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...