The red value in the field is ignored by KM.
It seems that the Variable field validation rules are different in these actions.
Is this Normal ?
Is there a way to solve this ?
You can get at the data stored in a Variable that has part of its name formed from a Token or another Variable (i.e. part of its name in %s) by using a Filter Action with "Value of Named Variable" as the filter.
Notice how in the Filter Action the dynamically named Variable is filtered as "Text".
I admit it does seem inconsistent that KM sometimes allows you to use tokens where variable are expected. Both of the labels at the right side of the following input boxes say "V", but both boxes don't work the same way, because one allows tokens and the other doesn't. It does seem like a labelling issue in the KM Editor at the minimum.
Why are you doing this -- is it so that you can create a Global variable based on the name of the executing macro? If so you are probably better off creating a Dictionary and posting a key-value pair to that, using the macro's name as the key.
@Zabobon's method is great, but you'll need to include the "Filter" action before every conditional that uses your dynamic variable, in case it has been changed since the last Filter:
Ah yes. That is more direct than "Process tokens" so, I have edited my post above to show that.
I also agree with @Nige_S that using a Dictionary is a better approach to this as Dictionaries can include Variables/Tokens in their names and in their keys with no need to use a Filter Action to get at the data.