How to set parameters

The concept of setting parameters in blocks

Forms of parameters

Different blocks can contain parameters of different forms including fields, drop-down lists, checkboxes, radio buttons and simple buttons.

The parameters required for the correct execution of the function are marked with a red star.

For more details on what should be chosen and entered in the current block, a user should look at the corresponding function description in the 'Functions Description' section.

Some typical examples with their explanations are considered below.

Setting a certain value

A majority of functions will need a certain value set to a parameter. For example, the 'Append file' function requires a specified file path and text to add. Also, the 'Assign value to variable' function requires an assigned value to the specified variable. In most cases to set a value, a user chooses one of the following options: 'Set a value', 'Save the previous step result' or 'Calculate a value'. Let's look more closely at what these options represent.

Set a value

Any data in the field is interpreted as either a string or a number

If the 'set a value' option is chosen, then everything that will be typed into the field will be taken as a string or as a number. For example, if a user types City "New York" to the field, then this will be processed as a string. On the other hand, if a user types something like 123, then this will be processed as a number. Additional examples are provided in the table below.

Input

Type

Output

831

Number

831

Contragent name

String

"Contragent name"

831 + 210

String

"831 + 210"

true

String

"true"

"Today is " + new Date()

String

"\"Today is \" + new Date()"

[1,2,3,4].filter( x => x > 2)

String

"[1,2,3,4].filter( x => x > 2)"

Save the previous step result

Takes what the previous function in the algorithm returns as the value

If the 'Save the previous step result' option is selected then the value will be what they previous function in the algorithm returns (if the previous function returns no result then nothing will be taken as the value). For example, if the 'Read emails' function is used, then the 'Assign value to variable' block is added automatically, with the 'Save the previous step result' option enabled to store the emails.

The selected 'Save the previous step result' option

Calculate a value

The variables take the value obtained according to the JavaScript rules

If the 'Calculate a value' option is selected, then the variable will be of the type that is obtained at the moment of assignment. JavaScript syntax rules must be followed.

For example, if true is assigned to a variable contragent_exists, then the variable will be logical. If "City New York" is assigned to a variable city, then it will become a string.

The table below shows the results for the same input data as in the table in the 'Set a value' section.

Input

Type

Output

831

Number

831

Contragent name

Undefined

Ошибка "Unexpected identifier"

831 + 210

Number

1041

true

Logical

true

"Today is " + new Date()

String

"Today is Thu Jul 04 2019 17:41:35 GMT+0300 (MSK)"

[1,2,3,4].filter( x => x > 2)

Array of numbers

[3,4]

Single fields

Some functions contain only one parameter with a field to input data. For example, in the functions such as 'If..then', 'Execute js code', and 'Do-while loop', it is required to type a JavaScript code. See more details in the 'Functions Description' section.

Also, in the 'Subprogram' function there is a single field, but a user can not input a JavaScript code. A simple string must be used to specify the subprogram path.