Step-by-step guide:

  1. Add a new element to the collection using the «Add Element» action.

  2. Set the «Collection» parameter for the action «Add Element 2». To do this, click the button with three dots, then click the buttonindicated in the screenshot below, and select the resource variable C from the list of robot actions:

  3. Set the «Object» parameter for the action «Add Element 2». To do this, click the button with three dots, then click the button indicated in the screenshot below, which will open the expression constructor.

  4. In the open window, select sequentially: «Actions/Arithmetic/Addition» and double-click the implementation of the action:

  5. Additional fields for setting the operand values will appear in the upper left corner. Set the values of the operands as the resource variables v1 and v2:

  6. After entering the operand values, click the «Save» button. The second element is added.

  7. A new artifact «Expression_Add Element 2_Value» appeared on the robot scheme.

  8. Run the robot and check the result:

We can see that the collection now contains the second element, and its value is 15, which is the sum of the variables v1 and v2.

  • Нет меток