3. Data Store Types
4. CSV type variables
When you want to use the column headers as Column names leave the check box checked just like in the example given above. Otherwise, columns are uppercase alphabets like A, B, C --- AA, AB and so on just like the notation in MS Excel.
5. Array type
6. Index
Examples
((family.brother(1))) or {{family.brother({{loop.count}})}}
7. Functions like COUNT, APPEND, and LAST are available.
Example
{{family.brothers(COUNT)}}
{{family.sisters(APPEND)}}
{{family.sisters(LAST)}}
8. The User Params operation in the Interactive group will generate its own variable.
9. Repeat counter variable.
There are 3 types of Variables used in STU.
User Defined Variables are the ones that are defined in the Variable section of STU.
Plugin/Operation generated variables are the variables specific to the Plugin when the Return Value of CSV has been selected.
One example is the User Param operation in the Interactive tool-group.
For most of plugin generated variables, Users get to define group name but the variable names are defined by the plugin itself.
In below example Folder_C becomes the group name of the variable.
Then in this example of File Monitor plugin, the variable names are Index, filepath, and filesize like described in its help document.
Special Variables are fixed in the STU system such as {{rp.index}} in the Repeat operation which holds the counter data.
{{group_name.variable_name}}
Double curly brackets in both front and the back and there is a . (period) in between group_name (your choice) and variable_name (your choice)
Define a "grp1" variable group like below in the 'User variables in Scenario'.
{ # Group variable name: "grp1" "grp1": { # simple variable (number) "var1": 100, # simple variable (string) "var2": "Hello World, Thank you for using ARGOS" # array "var3": [ 1, "Hello", "World", "Thank you for choosing ARGOS" ] } } |
{ # Group variable name: "grp2" "grp2": { # simple variable (number) "var4": 30, # simple variable (string) "var5": "I am a Bot" # array "var6": { 2, "ARGOS" } } |
Below are the variable notation examples and the actual value of the variable.
Variable | Value | Description |
---|---|---|
{{grp1.var1}} | 100 | actual value of simple variable "var1" of group variable "grp1" |
{{grp1.var3(2)}} | "Hello" | the 2nd item of array variable "var3" of group variable "grp1" |
{{grp1.var3(APPEND)}} | ※ see below "How to use APPEND" | |
{{grp1.var3(COUNT)}} | 4 | total number of items in the "grp1.var3" array variable. It is used as an index in "Repeat" action |
{{grp1.var3(LAST)}} | "Thank you for choosing ARGOS" | the last item in the "grp1.var3" array variable |
Hello {{grp1.var3(3)}} ! | "Hello World!" | Substitution. {{grp1.var3(3)}} placeholder is replaced with its actual value of array, "World |
'COUNT' can be used as an index in "Repeat".
See below.
When repeating same operations for all items in array, you have to know the total number of items in array variable. You can obtain it by using 'COUNT'.
For examples, "{{grp1.var3(COUNT)}}" means the total number of items of "{{grp1.var3}}" array variable.
The value of {{grp1.var3(COUNT)}} is "4".
Suppose you have a array variable that already has a values.
In this example, I'll show you how to append "{{grp2.var2}}" (simple variable) and "{{grp2.var3}}" (array) to another array variable "{{grp1.var3}}".
Sample Excel Data for "grp2":
A | B | C | |
---|---|---|---|
1 | var1 | 30 | |
2 | var2 | I am a Bot | |
3 | var3 | 2 | ARGOS |
※ To check out the result value of "{{grp1.var3}}", print on 'Notepad' by using 'Repeat" and 'TextInput' actions
Results | Description |
---|---|
1 Hello World Thank you for choosing ARGOS I am a Bot | {{grp1.var3}} values Appended value |
Results | Description |
---|---|
1 Hello World Thank you for choosing ARGOS ['2', 'ARGOS'] | Original {{grp1.var3}} values. Appended value. Array converted to a simple variable automatically. It is not a array but a simple variable. |
There are 3 types in the result type of plugins. Only 'string' can be used with 'APPEND'.