Apart from inputs and outputs, nodes can have input fields from which the data can be consumed within the node.
The dataStructure object is the prefered way to specify what kind of data fields are available. This map is stored within the structure.json.
The following applies to the
within the root of structure.json.
|text, textarea, string, password, number, date, select, checkbox
|A list of options for a select field. Only applies to data fields where dataStructure.type equals 'select'.
|Specifies that the data field is a required field.
|Specifies that the value of this data field should be stored in the vault.
|A description for the data field.
|A label/name for the data field. If none is provided, the key of the dataStructure is used instead to reflect this field in the UI.
|Relates the field in the dataStructure to a given input by name. Ensures that node.getData() returns a combined array of the field and the related input values.
|The name of the related input.
|If set to true, this data field will be hidden and disabled when anything is connected to the given input.
|Defines the minimum value that is acceptable and valid for a data field.
|Defines the maximum value that is acceptable and valid for a data field.
|Defines the minimum number of characters (as UTF-16 code units) a data field must contain. If no minlength is specified, or an invalid value is specified, the input has no minimum length.
|Defines the maximum number of characters (as UTF-16 code units) a data field must contain. If no maxlength is specified, or an invalid value is specified, the input has no maximum length.
|Specifies a regular expression the data value should match. Only applies to types 'text' & 'password'.
If as a developer you want full control of what is rendered for a certain node within the editor, you can instead ahve a look at the editor documentation.
Note that this is not the preferred way of managing data, and should only be used when the dataStructure does not provide sufficient options.
Within a node, a (
await) call to
is sufficient to fetch the following as an array;
- The data stored in the node for the given dataName.
- The data retrieved by related inputs, if
dataStructure[dataName].input.replacesis set, the data stored in the node for the given dataName is ignored.
This method always returns an array, even when no input is related in the dataStructure.