Dynamically creating list for Prompt for Variables

I’d like to create the list of possible values for a variable of type Unsorted List in the Prompt for Variables action.
I would do that using a File iterator.

The question therefore is: is it possible to create a variable, append the folder names in it as I iterate through folders, and then put that variable in the Values field?
How do I go about adding carriage returns (\r\n) in the variable string?


Yes, you can do this.

In VBScript you can append another line to a variable like this:
myVariable = myVariable + vbCRLF + “another value”