The create variable activity can be used to create instances of ordinal types, lists, entities and classes. The result of this activity is a variable that can be used in the rest of the flow, and can be set as the result of a flow. It is possible to initialise the variable directly, by specifying text in the initialisation field.
Activity properties
begin var StringArray: TArray<string>; StringArray := ExisitingStringArray; end; |
Resulting Code
Possible variable types:
•Array -> TArray<T>
•Bigint -> Int64
•Binary -> ICodolexBinary
•Boolean -> Boolean
•Custom
•Date/Time -> TDateTime
•Decimal -> Double
•Entity
•Enumeration -> unsuported
•Flow class
•Integer -> Integer
•JSONValue -> TJSONValue
•List -> ICodolexList<T>
•String -> string
Arrays & Lists
Arrays and list have the extra option for collection type, this determines the T of the array/list.
Possible options are:
•Auto increment -> Integer
•Bigint -> Int64
•Boolean -> Boolean
•Custom
•Date/Time -> TDateTime
•Decimal -> Double
•Entity
•Integer -> Integer
•String -> string
Custom
A custom type variable can be any type needed, in the create variable activity, the custom type also give the option to include a unit in the implementation if needed for the variable.
Entity
The entity type lets you create an entity and fill in the attributes. The possible entities are the entities available in the projects datasources.
Initialize class variable
When using class variables in a flow class, the initialisation is possible in every non-class flow of that class.