Hoping to loop through a number of items, adding each one to an "array", then target that array later in the Macro to select an item from the list.
What I'm attempting to achieve is to populate a KM Prompt With List action with the (folder) names inside a (static / specified) directory.
Here's what I have so far:
- For Each loops through the items in specified directory
- Logic to filter for only Directory type
- Get and set Var with the name of the Directory from each item's path
- A counter Var for incrementing inside the loop
- A Prompt With List from Var
What I can't figure out is how to add each item, or %Variable%item[%Variable%count%]%, to a Var in order to target with the Prompt With List, outside the loop. Right now it's returning only the final item (FolderName) from the loop.
For clarification, the folders inside the directory change often, otherwise I would define a static text list of the folder names.
Is this best suited for a Dictionary instead of a Variable?
Do I need to leverage AppleScript instead?
Can anyone point me in the right direction? ️