Unmark a palette item based on variable holding last-marked macro name?

Hi, all:

I'm getting into palettes and am pretty excited about what they can do for me. Here's a question that has me a little stumped.

**Context:**In Logic Pro X, you can make a set of 8 dials (for example) on your MIDI device control many different sets of 8 things, and you switch between these sets using yet another MIDI command. This lets you turn cheap/modest/small/old controllers into really powerful devices.

I've got this set up so that I can switch sets via MIDI but also via KBM, and my macro group "Axiom Pro 61" shows up only when Logic is launched and a specific controller (the AxPro61) is connected. So cool, @peternlewis!

image

I like that the palette not only gives me a second way to switch sets but also helps me learn the commands I've created.

I know I can easily mark the most recently chosen setting, and I can set a variable to contain the name of that just-chosen setting:

image

but when I move on to a different setting (macro), there's no way for me to use the variable I set earlier to specify which macro to unmark:

What am I missing?

Thanks so much! I keep telling people how great KBM is, and I know I'm only scratching the surface.
CK