Skip to main content
Version: 8.1

system.secsgem.toTreeDataset

This function is used in Python Scripting.

Description

Changes an existing dataset, as returned by the system.secsgem.toDataSet function, to make it usable for the Tree View component.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.secsgem.toTreeDataSet(dataset)

Parameters

TypeParameterDescription
DatasetdatasetA DataSet containing a SECS message. Note that this parameter cannot take a JSON message, so the object returned by system.secsgem.getResponse must first be processed by system.secsgem.toDataSet.

Returns

Dataset - A dataset containing a SECS message with the following columns, as suited for Vision's tree view component: "path", "text", "icon", "background", "foreground", "tooltip", "border", "selectedText", "selectedIcon", "selectedBackground", "selectedForeground", "selectedTooltip", "selectedBorder"

Scope

Gateway, Vision Client, Perspective Session

Code Example

Code Snippet
# Assuming the variable named "message" contains a SECS message, we will first convert it to a Dataset.
dataset = system.secsgem.toDataSet(message)

# The initial dataset generated by toDataSet will not work with the Tree View component, so we'll modify it...
dataset = system.secsgem.toTreeDataSet(dataset)

# ...and now pass the dataset into the Tree View component's data property.
event.source.parent.getComponent('Tree View').data = dataset

Keywords

system secsgem toTreeDataset, secsgem.toTreeDataset