How to read Column Values from a given Data Table using DataValueCursor
Introduction
How to read Column Values from a given Data Table using DataValueCursor
Code sample
# Copyright © 2017. TIBCO Software Inc. Licensed under TIBCO BSD-style license. from Spotfire.Dxp.Data import * tableName='World Bank Data' columnToFetch='Region' activeTable=Document.Data.Tables[tableName] rowCount = activeTable.RowCount print rowCount rowsToInclude = IndexSet(rowCount,True) cursor1 = DataValueCursor.CreateFormatted(activeTable.Columns[columnToFetch]) ctr1 = 0 for row in activeTable.GetRows(rowsToInclude,cursor1): rowIndex = row.Index val1 = cursor1.CurrentValue print val1 ctr1 = ctr1 + 1 if (ctr1 == 5): break
References
- API Reference: Spotfire Analyst
- API Reference: DataValueCursor class
- API Reference: DataTable.GetRows Method
License: TIBCO BSD-Style License
Recommended Comments
There are no comments to display.