Adding up variables

Hi there,

For my project I have a variable that’s starts at 0. When I use a ‘For Each Row’-command I would like to add up a value in that row to this variable. My solution until so far is that the robot writes the new value in a cell with a ‘Write Cell’-command. I’m wondering if it is possible to do this more efficient with just adding up the variables each time without the ‘Write Cell’-command. Is this possible in StudioX? Many thanks for your reaction!

Hi @Bert-Jan

In studiox for each row activities property is there an property called index?

No, not that I can find

For us to better understand the situation, could you share your workflow?

Of course:

In the last For Each Row I have placed a if-statement where in the Else section I first Read a Cell and call it IngedeeldeUrenvast (Sorry, dutch :grinning:) and next in the Write cell command I add a value from a table to this variable (IngedeeldeUrenVast). This does the trick but is it not possible to add a value to the variable and store it in memory instead of writing it each time (row)?

  1. There is a CurrentIndex property inside the ForEachRow activity - it is available in the dropdown in the Text Builder or Numeric Calculation dialogs.

  1. You can use Saved Values and Number Builder to add numbers