Manipulating data already loaded into Spotfire
There are many ways to manipulate the data in an analysis file using the Spotfire.Dxp.Data
namespace, but the three most common activities are navigating a table to look up values, marking/selecting data, and creating and changing calculated columns. These are the three areas we're going to cover in this section.
Reading a table
The ability to read a data table using a script is a very useful tool, allowing you, for example, to drive actions based on the values in a metadata table. It's also very easy to do. You just need to define cursors for the columns you want to read and then iterate through the table's rows, inspecting the values of these cursors as you go. The data table object is the key to this activity; so, just to recap, you get a data table object as follows:
dataTable = Document.Data.Tables.TryGetValue(Name of data table)[1]
Action |
Property or Method |
---|---|
Define a string cursor |
|