Skip to content

← programming package

GetField

Access a field with a specific name on an object.

If the field is not found, return the value specified by the 'notfound' port or raise an error (notfound is respected regardless of whether the object has a fixed set of fields or an open-ended set). However, if the key is of the wrong data type (e.g. indexing an array with a string) or is syntactically malformed, an error will be raised even if notfound is not set to '(error)'. The available fields depend on the object being accessed, and can be looked up in the documentation. Typically, the error message will also indicate the available fields. If either the field or the data are none, the output will be None. Version 1.0.0

Ports/Properties

data

Data to process.

verbose name
Data
default value
None
port type
DataPort
value type
object (can be None)
data direction
INOUT

field

Field to access.

verbose name
Field
default value
port type
StringPort
value type
str (can be None)

notfound

Value to return if the field is not found. If set to special value '(error)', raise an error. This can also be set to None or a default value.

verbose name
If Not Found
default value
(error)
port type
Port
value type
object (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

verbose name
Set Breakpoint (Debug Only)
default value
False
port type
BoolPort
value type
bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

verbose name
Metadata
default value
{}
port type
DictPort
value type
dict (can be None)