Code sample article to list the column properties in an analysis and also get/set a property for a specific column
Introduction
Below is a sample article on how to list the column properties in an analysis and also get/set a property for a specific column
Code Sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. from Spotfire.Dxp.Data import * # Iterate over all the column properties available for prop in Document.Data.Properties.GetProperties(DataPropertyClass.Column): if prop.IsUserVisible and prop.IsUserEditable: print str(prop.Name)+": "+str(prop.Value) #Get/Set the column property of a specific column table=Document.Data.Tables["tableName"] column=table.Columns["ColumnName"] columnProperties=column.Properties #get a property print columnProperties.GetProperty("columnPropertyName") #check if a property exists and set a property if columnProperties.PropertyExists("columnPropertyName"): columnProperties.SetProperty("columnPropertyName","newValue") print columnProperties.GetProperty("columnPropertyName")
References
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.