Use a loop and have a data item say Count with initial value as 1; increment the count value before loop ends. Now, in the loop use this count value and a decision stage to check if the count is even number or odd. Based on that, store the value from collection in to data items and use a calc stage to perform substraction.
You can use the 'Read Collection Field' action and pass the row index as Row x and Row x-1 until you reach the last row.
Here x is a running incremental counter.
Note that the collection row index starts from 0. So if you start from x=1 then based on the above equation you will get value of Row 1 and Row 0. ie; 1st and 2nd row of the collection. Subtract these two values, store it where you want and continue the same till x = last row. You can get the last row using the 'Count rows' action of Collections VBO (not Collection manipulation).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.