Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

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

  2. Set the parameter «Collection» for the action «Add element 4». Click on the button with three dots, and then select «Add element 3» from the robot’s actions. Image RemovedImage Added

  3. Set the parameter «Value» for the action «Add element 4». Click on the button with three dots, and then click the button - call the expression constructor.

  4. In the pop-up window, select: «Operations/Arithmetic/Addition» and double-click the implementation of the action using the left mouse button:
    Image Modified

  5. Additional fields for setting operand values will appear in the upper-left corner:
    Image Modified

  6. In the field of the first operand of the operation «+»«Addition», we need to extract the first element from the collection. To do this:

  • Select the field of the first operand by placing the mouse cursor either to the left or right of the field and left-click LMB it once - the field will be selected with blue stripes on the left and right sides of it;
    Image Modified

  • Choose the action «Get value by index» from the group «Collections»;

  • Double-click LMB on the implementation of the action to get the panel for setting the parameters of the action «Get value by index 1»;
    Image Modified

  • Set the collection for the first operand of the action «Get value by index 1» through the button with three dots, and then the button indicated in the screenshot, and select the resource variable C from the robot’s robot actions;
    Image Modified

  • Set the index for the first operand of the action «Get value by index 1» as 0;

  • We get the ready first operand of the operation «+»«Addition»:
    Image Modified

7. Repeat the same steps for the second operand of the operation

...

«Addition»:
Image Modified

But this time, set the index of the collection to 1:

Image Modified

8. After entering the operand values for the operation

...

«Addition», click the «Save» button and save the result in the resource variable C

...

. The fourth element is added.
Image Modified

9. A new artifact «Expression_Add element 4_Value» appeared on the

...

robot scheme.
Image Modified

10. Run the robot and check the result:
Image Modified

We can see that the collection now has the 4th element, and its value is 20 - the sum of the 1st and 2nd elements in the collection, set earlier.