Variables
Last updated
Was this helpful?
Last updated
Was this helpful?
Flow variables come in three different categories: simple values, records and tables.
A "simple value" (known as a "primitive type" value in some programming languages) is the most common variable type. A simple value variable can contain text ("string"), a number, a date, or a truth (Boolean) value. Internally, Flow keeps track of exactly which one of these sub-types a value currently has; however, as a user of the Flow Designer you rarely have to care about the exact type of a variable, since Flow will go to great lengths to automatically convert the types into something that makes sense in your workflow.
See Assignment row 1-3 for different types of simple value assignment.
The following list describes the different types of literals available in FlowScript.
Example
Result
"abcd"
A simple value containing the string abcd
'abcd'
A simple value containing the string abcd
1
A simple value containing the integer value 1
1.5
A simple value containing the floating point value 1.5
true
A simple value containing the boolean true
false
A simple value containing the boolean false
When fetching data from outside sources using connectors, Flow will sometimes encounter numeric values that are set to null in a third party system. Such values are converted into a special NaN ("Not a Number") values in Flow. The IsNaN function can be used to test for this.
A table is a structure of columns and rows. Tables can be defined by one or more records (see row 6 in Assignment step above). There are many more ways to produce a table, for exmaple by using a Table step or Machine step. TODO
A record (roughly equivalent to a "dictionary" or "object" in other programming languages) is a group of named values.
Records are constructed using the following syntax:
See Assignment row 4 where a new record with name recordA is assigned with a value for name and age. This record can later on be used just like recordB is used on row 5.
You can use the unary asterisk operator (*) to create a single-row table from a record:
FlowScript supports nil values for records where the record has a known type. This allows recursive type definitions. In most cases, nil values are not allowed. Please see the Programs section for more information.