Marking

Source:

Methods

addMarking(markingName, markingColor, replaceMarking) → {string}

Adds a marking to the TIBCO Spotfire Document.
Parameters:
Name Type Description
markingName string Name of the marking. Cannot be null or empty.
markingColor string Color of the marking. Can be empty.
replaceMarking string True if a marking with same name will be replaced.
Source:
Returns:
Name of the created marking. If the provided marking name is already used in the TIBCO Spotfire Document, a new marking with new name is created or the extisting one is replaced.
Type
string
Throws:
If the marking name is empty.
Examples
addMarking("OrangeMarking", "Orange", "True");
addMarking("BlueMarking", "#0F6DF1", "False");

deleteMarkedRows()

Deletes marked rows from data table.
Source:

exportMarkedData(datatablename, folderpath, filename, fileformat, marking, columns, numRows)

Export marked data of a TIBCO Spotfire Data Table.
Parameters:
Name Type Description
datatablename string The name of data table to export. If empty, the Spotfire active data table is used.
folderpath string The UNC where data will be exported into.
filename string The name of export file.
fileformat string The format of the export format.
marking string The name of the marking to export. If empty, the Spotfire active marking is used.
columns string The name of the columns to export separated by comma(,).
numRows string The number of rows that will be exported.
Source:
Throws:
  • If the data table does not exist in the document.
  • If the marking does not exist in the document.
  • If the folder cannot be reached.
  • If the columns does not exist in the data table.

getActiveMarking() → {string}

Gets the active TIBCO Spotfire Marking name.
Source:
Returns:
The name of the active TIBCO Spotfire Marking.
Type
string

getDefaultMarking() → {string}

Gets the default TIBCO Spotfire Marking name.
Source:
Returns:
The name of the default TIBCO Spotfire Marking.
Type
string

getMarkedCount(datatable, marking) → {string}

Returns the number of TIBCO Spotfire Data marked records.
Parameters:
Name Type Description
datatable string The name of the data table. If empty, the active data table is used.
marking string The name of the marking. If empty, the active marking is used.
Source:
Returns:
The number of marked records.
Type
string
Throws:
  • If the data table does not exist in the Document.
  • If the marking does not exist in the document.

getMarkedValues(datatable, marking, column, delimiter, maximum) → {string}

Returns the list of TIBCO Spotfire Data marked records, without duplicate values.
Parameters:
Name Type Description
datatable string The name of the data table. If empty, the active data table is used.
marking string The name of the marking. If empty, the active marking is used.
column string The name of the column which holds the values to return.
delimiter string The delimiter of the returned values list.
maximum integer number of values read. Beware, only the first "maximum" records are read and the result does not contain duplicate, so "maximum" can be different from the number of values returned. When null all data will be send back.
Source:
Returns:
The list of the marked records values without duplicate.
Type
string
Throws:
  • If the data table does not exist in the Document.
  • If the column does not exist in the data table.
  • If the marking does not exist in the document.

getMarking() → {string}

Gets the name of the active Marking.
Source:
Returns:
The name of the active Marking.
Type
string

invertMarkedRows()

Invert the marking in the active Data Table, that is marked rows are unmarked and other rows are marked.
Source:

markFilteredRows()

Marks filtered rows in the document.
Source:

markRecords(datatable, marking, column, values, delimiter)

Marks TIBCO Spotfire Data records matching a specific value. Existing marking is kept.
Parameters:
Name Type Description
datatable string The name of the data table to mark.
marking string The name of the existing Spotfire marking used to mark data. If empty, the active marking is used.
column string The name of the column which holds the values to mark.
values string The list of values to match. The values are separated by a delimiter (defined in delimiter parameter).
delimiter string The delimiter of the values list.
Source:
Throws:
  • If the data table does not exist in the Document.
  • If the column does not exist in the data table.
  • If the marking does not exist in the document.
Example
markRecords('Pipeline Pilot Data 1', 'Marking', 'Cluster', '5;6', ';');

markRecordsExclusive(datatable, marking, column, values, delimiter)

Marks TIBCO Spotfire Data records matching a specific value. Existing marking is removed.
Parameters:
Name Type Description
datatable string The name of the data table to mark.
marking string The name of the existing Spotfire marking used to mark data. If empty, the active marking is used.
column string The name of the column which holds the values to mark.
values string The list of values to match. The values are separated by a delimiter (defined in delimiter parameter).
delimiter string The delimiter of the values list.
Source:
Throws:
  • If the data table does not exist in the Document.
  • If the column does not exist in the data table.
  • If the marking does not exist in the document.
Example
markRecordsExclusive('Pipeline Pilot Data 1', 'Marking', 'Cluster', '5;6', ';');

setDefaultMarking(markingName)

Sets a marking as default in the TIBCO SPotfire Document.
Parameters:
Name Type Description
markingName string Name of the marking.
Source:
Throws:
If the marking does not exist in the document.
Example
setMarkingAsDefault("BlueMarking");

setMarking(marking)

Sets the name of the active Marking.
Parameters:
Name Type Description
marking string The name of the active Marking to set.
Source:
Throws:
Message error, use getError method to get the error message.

unmarkMarkedRows()

Unmarks rows marked by the active marking in the active Data Table.
Source:

uploadMarkedData(datatablename, urlServerRoot, sessionID, destinationpath, filename, fileformat, marking, columns)

Upload marked data of a Tibco Spotfire Data Table.
Parameters:
Name Type Description
datatablename string The name of data table to upload. If empty, the Spotfire active data table is used.
urlServerRoot string The root URL of the Pipeline Pilot Server.
sessionID string The Pipeline Pilot session ID.
destinationpath string The destination path where data will be uploaded into.
filename string The name of uploaded file.
fileformat string The format of the uploaded file.
marking string The name of the marking to upload. If empty, the Spotfire active marking is used.
columns string The name of the columns to upload separated by comma(,).
Source:
Throws:
  • If the data table does not exist in the document.
  • If the marking does not exist in the document.
  • If the columns does not exist in the data table.