Hello community, I am exploring the loop functionality of a scrip task but can't figure out how to do the following.
I have a list of 6 map entries (same structure) with e.g. 4 fields and want to pass the values of the field of each map entry to a subprocess for earch entry fetching the values. I use pv!listOfMap[tp!instanceindex] to get the values. But what happens is that the script task iterates 6 times first and passing the last value of index 6, to 6 instances of the sub process. So ending with 6 instances with only the last value, instead of 1 to 6. I know I can pass the list of maps to the sub process and also pass the [tp!instanceindex] as a variable, and use the index in the sub process. But what am I doing wrong here?
Kind Regards,
Erik
Discussion posts and replies are publicly visible
Hi Erik
A little difficult to understand what's going on form your description...but let's try and separate this into a smaller set of problems to solve:
I would also run the whole thing in debug mode again at this point and prove to myself that the individual sub-process instances contain the correct individual item from your array
Thank you Steward, followed your approach and it works.