This article explains how to tag marked rows in Spotfire® using IronPython Scripting
Introduction
This article demonstrates how to tag marked rows
Code Sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. from Spotfire.Dxp.Data import DataColumn, TagsColumn from Spotfire.Dxp.Data import DataPropertyClass, DataType, DataValueCursor, IDataColumn, IndexSet from Spotfire.Dxp.Data import RowSelection # Tag the marked rows markedRowSelection = Document.ActiveMarkingSelectionReference.GetSelection(Document.ActiveDataTableReference) table = Document.ActiveDataTableReference #Get handle to the required column and typecast it to a tagcolumn myTagColumn = table.Columns.Item["GROUP"].As[TagsColumn]() selectRows = IndexSet(table.RowCount, True) #Loop through the tag list and add the tagged/nontagged rows tags = myTagColumn.TagValues for t in tags: if t == 'Tag 1': myTagColumn.Tag(t, RowSelection(selectRows)) if t == 'Tag 2': myTagColumn.Tag(t, markedRowSelection)
References
License: TIBCO BSD-Style License
Back to IronPython Scripting in TIBCO Spotfire Examples: https://community.spotfire.com/s/article/IronPython-Scripting-in-Spotfire
Recommended Comments
There are no comments to display.