Sample script to remove all the calcuated columns from a data table
Introduction
Below is a sample script on how to remove all the calcuated columns from a data table
Code Sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. from Spotfire.Dxp.Data import * from System.Collections.Generic import List dataTable=Document.Data.Tables["dataTableName"] columnCollection=dataTable.Columns columnsToRemove=List[DataColumn]() #Find Calculated Columns for col in columnCollection: if col.Properties.ColumnType==DataColumnType.Calculated: print col.Properties.ColumnType columnsToRemove.Add(col) #Remove Calculcated Columns from Column Collection columnCollection.Remove(columnsToRemove)
References
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.