Getting Macro Information Based on Values Set Elsewhere

The title is a bit confusing, but it's hard to express in a few words. Basically, I'd like to do some things with macro information tokens. To keep things simple, assume I want to collect %ExecutingThisMacroUUID% from a few of my macros, and to then do a bunch of stuff with it.

The easy way to do this is to call another macro from the first macro, and set the parameter to %ExecutingThisMacroUUID% ... and that works. But now, time passes, and I've put that "execute get info macro" step into 15 of my macros. I realize that I'd also like to collect %TriggerValue% ... I have to edit one of the copies of "execute get info macro" to change the parameter, then copy and paste that new version into everywhere I put it before.

What I'd really like to do is something more like this:

  1. Call "Set the parameters" subroutine (or macro) from the macro of interest.

  2. The "Set the parameters" macro has a list of all the parameters I'm interested in using, just stored in a variable, say it's MyDataFields: %ExecutingThisMacroUUID% | %TriggerValue%

  3. The variable is returned to the calling macro, which then calls the "get info" macro with the parameter set to the interpreted value of MyDataFields—so that the information from the current macro is passed to the "get info" macro.

If I ever decide to change the fields in the future, I just need to change the "Set the parameters" macro, which is a lot easier, obviously.

I tried a number of experiments with tokens and not processing anything in one area, then filtering with process tokens, but had no luck. Is what I'm trying to do possible?

thanks;
-rob.

Sigh; this was me not knowing what I was doing (again). I wanted %ExecutingMacroUUID% not %ExecutingThisMacroUUID%. "Never mind...."

-rob.

1 Like