Variable in Loop, With changing values store each new value in an array variable, is it possible?

Hello, I have an issue. I am using a loop to read each cell value and store the value in a Variable named Value_Tfc and Value_Hqc (This is working fine). Then im using each of these variables to fill in data into a new array Variable named Temp_Tfc and Temp_Hqc.

Upon completion of the loop, it will then display each value (as show in the output).

However, the array only contains the latest value of Value_Tfc and Value_Hqc respectively.

Please guide me as to how I can use Value_Hqc/Tfc to store each new value into array Temp_Hqc/Tfc


In general, we can’t add item to array. Please use List<Double> type variable and AddCollection activity.


Hey, @Saad_Sajjad_Khattak! As you will be adding elements to an empty array, initialized earlier, you can add ‘.concat’ method to make this array dynamic. Let’s take a look!

→ In this example, I initialized an array like you and a value of type double, because I will keep incrementing it to add to the array.

→ Let’s move on to dynamically adding elements to the array.

→ Let’s see the result!

Hope this helps!

Thank You so Much. Much appreciated. So grateful for the immediate response from the community.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.