How to expose the quantity of list items to an action? Put another way.

Using a loop, how do I pass the number of items in a list to an action outside the loop?

I have created a loop and within the loop I have added an action to calculate a data value as follows

Data selector: 'loop_name:quantity' 

Calculation: *1 = calculation_result


From within the loop I can access the new variable 'calculation_result' however I can not figure out how to expose the calculation result to other data selectors. 

What steps am I missing?
You have to create a new variable BEFORE your loop.



And then select the type of variables in that list. For your example, perhaps a list of decimals?



Be sure to give it a good custom name for your loop:



Then, in your loop, you can add a new variable to an existing list:



Then, after your loop, you can access calculation results:



Note, that if you don't know explicitly which in your loop you want, then you will have to loop through your new calculation results and use a condition rule to return the one you need as (yet another) variable.