Skip to main content

populateVariables

Populates a list of variables for use in dropdown controls.

Signature

populateVariables(
source: Node | NodeBlock | Condition | ConditionBlock,
filter?: (slot: Slot, pipe: boolean, block: NodeBlock) => boolean,
value?: string,
includeSelf?: boolean,
...excludes: (string | undefined)[]
): IDropdownOption[]

Parameters

NameTypeOptionalDescription
sourceNode | NodeBlock | Condition | ConditionBlockNoSpecifies the source for the list.
filter(slot: Slot, pipe: boolean, block: NodeBlock) => booleanYesOptional filter function that is invoked for each slot found.
valuestringYesSpecifies an optional value of the control that will use the variables list. This will assure that the referenced variable in that value will be included in the list.
includeSelfbooleanYesSpecifies if slots of the source should be included or not (default is false).
...excludes(string | undefined)[]YesSpecifies the slot identifiers of slots that should be ignored.

Return value

Returns an IDropdownOption array with dropdown options.