What does "Filter Variable ‘Variable’ with Value of Named Variable" do?

What does this action do?

I've racked my brain, but I've come up with nothing but echoes.

It appears to be the equivalent of a Set Variable Action that sets Var2 to Var1.

I've not used it before, can't find any documentation about it, but from testing that is what I have learned.

I don't immediately see any advantage to using the filter vs directly setting Var2, but maybe @peternlewis can enlighten us.

####Example:

####Produces this:

If replaces the variable’s value with the value of the variable named by the value of the variable in question. Basically, it is an indirection, allowing you to read the value of a variable whose name is in a variable.

It is the equivalent of

Set variable Name to %Variable%(%Variable%Name%)%

which does not work and which you can’t do easily.

It is equivalent to

Set variable Name to %%Variable%%%Variable%Name%%%
Filter Variable "Name" Process Tokens
2 Likes

In other words, I didn’t need to write Get the Value of a Named Variable

Thanks for the explanation, Peter.

I should have thought of this, because I already had a macro that does indirection the hard way

####So, instead of:

####I could use:

BTW, it took me a while to figure out the correct syntax for this:

%%Variable%%%Variable%PassedVarName%%%

Let's say PassedVarName = "MyVar1"
Then, the above compound token would result in:

%Variable%MyVar1%
1 Like