Dynamically Adding a List Item When Using "Prompt With List" Action

Just one additional suggestion to add to @kcwhat's excellent example - if you Enclose the Prompt an "Execute Actions Until Conditions Met" Action and make the Condition to break from the loop "Until the Variable Listings is not empty" then you don't have to reopen the Prompt with List if you add a new item. The List will stay open when you add any new items and only move on when you make a selection from the existing items on the list. Hope that makes sense - hard to upload an example when I don't have the original Macro.

Here is what I mean (in a different Macro example that I made for myself when I was trying to figure this stuff out). In this case the Dynamic List is stored in a Variable rather than a File and the Prompt is a Prompt for User Input rather than a Prompt from List. But the general idea is the same i.e. a list that can be added to or chosen from. And it shows the idea I mentioned above of enclosing in a Loop to keep the Prompt open if a new item is added.

EXAMPLE Dynamic List from Prompt v2.00.kmmacros (14.0 KB)

Click to Show Image of Macro

EXAMPLE Dynamic List from Prompt v2.00-Animated GIF

3 Likes