Apr 30, 2014

Create New Column on spotfire Data table using python script

curDT = Document.ActiveDataTableReference cols = curDT.Columns #targetCol = Document.Properties["myColumnSelection"] #Create a new column that counts the comma delimiter myExpression = "sum([Goods]) over([statecode])" myNewColName = cols.CreateUniqueName("TotalRevenue") cols.AddCalculatedColumn(myNewColName, myExpression)

Apr 3, 2014

Select Deselect all values using python script in Spotfire

from Spotfire.Dxp.Application.Filters import CheckBoxHierarchyFilter plFilter=Document.FilteringSchemes[1].Item[tab].Item[tab.Columns.Item["Region"]].As[CheckBoxHierarchyFilter]() if Document.Properties.Item["Status"]=="All": plFilter.UncheckAllNodes() Document.Properties.Item["Status"]="None" else: plFilter.CheckAllNodes() Document.Properties.Item["Status"]="All"