Get Children
Block Group: | Data Services |
Block Icon: |
The Get Children Block returns a table that lists the children of a data node.
For information on using dataflow blocks, see Dataflow.
Note
You can drag a node from the Data panel into the dataflow window to automatically create a Get Children block for that node.
Input/Output Property
The following property of the Get Children block can take input and give output.
- path (string)
path specifies the node for which to list children. You can drag the node's icon from the Data panel to this field.
Output Properties
The following properties of the Get Children block can give output but cannot take input.
- output (table)
- error (string)
output returns a table that lists the children of the specified node. The table includes the following fields:
- name—The name of the child node.
- path—The full path of the child node.
- hasChildren—TRUE if the child node has children, FALSE if the child node is terminal.
- hasValue—TRUE if the child node is associated with a value, FALSE otherwise.
- hasHistory—TRUE if the child node is associated with a value history, FALSE otherwise.
- type—The data type of the child node, if applicable.
- icon—The absolute file path to the icon that represents the child node.
- unit—The units of the child node, if applicable.
- enum—The names of the enum options, if applicable. For a boolean value, this column holds the strings associated with each value, such as "On" and "Off".
error returns the error message, if any.
About the Output Table
- The output table of the Get Children block is only one level deep. Therefore, when a node that has children is listed, the node is represented with a name, not a table. You can use multiple Get Children blocks to retrieve deeper lists.
Example
The following image demonstrates how to create a Get Children block by dragging a node to the dataflow window.