For Each Variable With A Given Prefix Do: XYZ

For example maybe I want to append each variable with prefix "Mega_" with the text "Finished"

How do I set this up in the "for each" action and how do I reference each variable in the performing actions?

Use the Variables collection and the Filter with Value of Named Variable action:

Example Macro.kmmacros (3.1 KB)

It wasn't clear to me from your question whether you were asking how to append "Finished" to the variable's name or the variable's value, so this example shows how to do both.

1 Like

Thanks! Would you mind explaining the function of the filter action in this macro? I'm not super familiar with the action in general and unfortunately wasn't able to figure it out by reading the wiki page.

No problem. You're not the first to have that question, so hopefully this old thread answers it sufficiently:

1 Like