在spotfire中删除/删除或隐藏列

时间:2014-01-14 08:32:58

标签: ironpython tibco spotfire

如何在spotfire中使用铁脚本删除/删除或隐藏列?

我添加了一个列,如下所示:

`

curDT = Document.ActiveDataTableReference
cols = curDT.Columns
# targetCol = Document.Properties["myColumnSelection"]

#Create a new column that counts the comma delimiter
myExpression = '1+len(RXReplace([Cx],"([A-Za-z0-9]+)","","g"))'
myNewColName = cols.CreateUniqueName("NumElements")
cols.AddCalculatedColumn(myNewColName, myExpression)

`

2 个答案:

答案 0 :(得分:3)

如果它仍然有用:

from Spotfire.Dxp.Application.Visuals import VisualContent
contentTable = myTableVisualization.As[VisualContent]()
if contentTable.TableColumns.Contains(myData.Columns["MyColumn"]):
        contentTable.TableColumns.Remove(myData.Columns["MyColumn"])

答案 1 :(得分:1)

通过

删除列

cols.Remove( “NameOfColumnToRemove”)