Variables
Any task can use predefined variables. These variables are created through Developer Console and defined as JSON object. This JSON object is next transformed to input fields and available on User Dashboard in user friendly way.
This is how different parameters of task can be configured.
Example JSON variables definition might look like this:
JSON property name consists of variable type and variable name and is separated with #
. JSON property value is just our variable value.
In your code you would referance variable by its name. To output second variable you would type: {{ ORDER_EXPORT_TYPE | log }}
Above snippet would look like this on User Dashboard:
Variable type might be one of the following:
Metadata
For all variable you can define metadata where you would specify additional variable context. To the variables JSON definition add new special property called metadata
where you can define additional input field configuration.helpText
or options
(only for select
field).
Available metadata properties are:
- subtype
- applicable to short_text field only. Might be one of the following: password
, email
, number
, or integer
- min
- min value of short_text
with number subtype
- max
- max value of short_text
with number subtype
- minLength
- min number of characters in short_text
- maxLength
- max number of characters in short_text
- maxArraySize
- applicable only to array variables, specifies max number of elements in an array
- helpText
- help text displayed below input field
- step
- step of number
subtype
- pattern
- regex pattern for input field
- showCharacterCount
- shows current number of characters in input field
- options
- applicable only to select
field. Contains list of available options for select field.
metadata property is not considered as variable therefore can't be access from script logic
Last updated