Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


Brian Baker
2022-08-11T21:59:57Z
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.
Sponsor
Forum information
Gary_W
2022-08-15T17:16:55Z
In the Set job variable task, don't forget to check the box for "Translate value to constant in Variable when running". In version 9.8.5 it's at the bottom. I'd like to see it moved up to the top of that dialog box where the rest of the user input controls are actually.
Michael Fjellström
2022-11-11T14:47:25Z
Originally Posted by: Gary_W 

In the Set job variable task, don't forget to check the box for "Translate value to constant in Variable when running". In version 9.8.5 it's at the bottom. I'd like to see it moved up to the top of that dialog box where the rest of the user input controls are actually.



Thanks for the help and contribution on this issue Gary!
Scroll to Top