I have Job Variable that has several values pre-assigned:
ABC
DEF
GHI
The job has a ForEach loop using each of these values. So far so good.
I use LOOP(CurrentValueX) to list files in a couple of tasks (Still good, output is as expected).
I then need to store the output of these list tasks in a job variable named the current value of x. (So variable is named ABC in first loop iteration, DEF in second iteration, etc.)
This is where the problem comes in. If I put {LOOP(CurrentValueX)} in the Name/Unique key in a Set Job Variable task, it create a Job Variable that is actually name '{LOOP(CurrentValueX)}' name the evaluated value of ABC, DEF, etc.
I'm assuming variable values just aren't calculated for this field. Is there any way to accomplish this other than create a whole bunch of condition evaluations just for this one job???
The other solution which doesn't exist (although I've seen it suggested as a feature), would be if there were a job control task like a SelectCase statement (If Value A goto to Task 1, if value B goto task 2, if value C goto task3, etc.)
If it helps at all to develop a solution, the reason I'm trying to get the listed files in individual job variable is to send out an e-mail as the final task that has sections in it for
ABC:
<files listed in ABC loop run>
DEF:
<files listed in DEF loop run>
etc.