Select Multiple Values From a `Prompt With List` Into a YAML FM Tag Array?

Hi All,

I know there is an option in prompt with list to to multiple select but I'm a bit confused

I want to use Keyboard Maestro to capture a webpage to obsidian including tags in a YAML FM tag array format.

I created this:

image

Yet I'm confused how does one pick more than one tag when prompted?

I want the tags I choose to be comma separated text in the array.

Thx so much in advance.

Z

Allow Multiple Selections:

Then use ⌘+Click for multiple selection.

The returned result will be a multiple line string.
If you want commas to separate the list, then do a regex search, replacing linefeed with comma.
image

1 Like

thx so much @martin

this was super helpful

i still have one thing i don't get. if i narrow down the first selection (lets say dessert) i can choose it with enter or Meta-click yet after this narrow down how does one choose another option (tag) like lets say cake to go along side dessert?

see example screenshot

image

here i first narrow down the long list to choose dessert now i want to add another tag from the list (cake ) to go along side desert. can this be done?

thx so much

Z

Do you mean you did not get this?

thx @martin !

I see where this gets confusing, i need to explain better

if the list is all visible then yes i can CMD-click but i want o use auto complete to choose tag1 select it (via enter/CMD-click) then use the nice auto complete to choose tag2 select it (via enter/CMD-click) and so on..
currently if i narrow down to tag 1 and select it auto closers the selection pane

does that make sense?

Z

Ah. I see.

I don't know how to do that within one prompt.
But I think you can do a multiple prompt like this:
image

Note: I have another prompt with the same list in the "While" action.
With this set up, if you need just one time selection, don't press and hold the key when you do the initial selection.

If you need a multiple selection, press and hold the key for whenever you narrow down the list and hit return.

When you do the last selection, do NOT press and hold the key. If you still do, and you realize you don't what to choose anymore, and you hit "Esc", the macro will be cancelled. If you don't want it to be cancelled, then you may need to something like this:

Uncheck "Failure Aborts Macro" and "Notify on Failure" option for the 2nd prompt.
image

Add an "If..." action and put the "Append variable" action in the "otherwise" section:
image

1 Like

thx so much @martin

this has been so useful and helpful

really appreciate your time and help!

best

Z