Skip to end of metadata
Go to start of metadata


VARIABLES


1. Notation



2. Examples

Define a "grp1" variable group like below in the 'User variables in Scenario'.

  • "grp1" including 3 variables, "var1","var2",and "var3".
Group Variable: grp1
{
	# Group variable name: "grp1"
	"grp1": {
		# simple variable (number)
		"var1": 100,

		# simple variable (string)
		"var2": "Hello World, Thank you for using ARGOS RPA+"

		# array 
		"var3": [ 1, "Hello", "World", "Thank you for choosing ARGOS RPA+" ]
	}
}
  • "grp2" including 3 variables, "var4","var5",and "var6".
Group Variable: grp2
{ 
	# Group variable name: "grp2"
	"grp2": {
		# simple variable (number)
		"var4": 30,

		# simple variable (string)
		"var5": "I am a Bot"

		# array
		"var6": { 2, "ARGOS RPA" }
}


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 ot use APPEND"
{{grp1.var3(COUNT)}}4total 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 RPA+"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


FUNCTIONS


1. COUNT

How to use "COUNT" in "Repeat"

'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".


2. APPEND

How to use "APPEND"

 Use case

  • 'Excel Basic' action
  • Result value of plugins

How to use "APPEND" in "Excel Basic"

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":


ABC
1var130
2var2I am a Bot
3var32ARGOS RPA


Ex1. Append "{{grp2.var2}}" (simple variable) to "{{grp1.var3}}" (array)

  1. Add "Excel Basic" action
  2. Choose "Read" in 'Read/Write'
  3. Select an excel file to read in STU
  4. (Option) Set 'Sheet name' (default: sheet1)
  5. Click "Add Item" 
  6. Set "Cell range" to "**B2**"
  7. Write "{{grp1.var3(APPEND)}}" in "Select variable" input box

※ To check out the result value of "{{grp1.var3}}", print on 'Notepad' by using 'Repeat" and 'TextInput' actions

ResultsDescription

1

Hello

World

Thank you for choosing ARGOS RPA+

I am a Bot




{{grp1.var3}} values

Appended value


Ex2. Append "**grp2.var6**" (array) to "grp1.var3" (array)

  1. Add "Excel Basic" action
  2. Choose "Read" in 'Read/Write'
  3. Select an excel file to read in STU
  4. (Option) Set 'Sheet name' (default: sheet1)
  5. Click "Add Item" 
  6. Set "Cell range" to "**B3:C3**"
  7. Write "**{{grp1.var3(APPEND)}}**" in "Select variable" input box
ResultsDescription

1

Hello

World

Thank you for choosing ARGOS RPA+

['2', 'ARGOS RPA']



Original {{grp1.var3}} values.

Appended value. Array converted to a simple variable automatically.

It is not a array but a simple variable.


How to use "APPEND" with return value of plugin

There are 3 types in the result type of plugins. Only 'string' can be used with 'APPEND'.

  1. Select the result type of plugin to 'string'
  2. Select 'Variable name' in variable table drop down menu. (ex) {{grp1.var3}}
  3. Edit variable name like "{{grp1.var3(APPEND)}}". <br>The returned value is appended to {{grp1.var3}}.