Can i use a Variable within a Variable [Dynamic Variable Name] to paste a text?

You are close, but it is confusing. To use a KM Variable whose name is dynamically determined in the Macro, it requires two steps:

  1. Set a Variable to the variable token (computed name) you want to use:
    %%Variable%%myVar%Variable%myVarIndex%%%
    image
    .
  2. Use a KM Filter Action to process that Variable to "Process Tokens" to Get the Actual Data
    image

So now that variable can be used for output, like in your Insert Text by Pasting:
image

Here's an example Macro that demos this process.
Please feel free to ask any questions.


MACRO:   Use Dynamic Variable Names [Example]


#### DOWNLOAD:
<a class="attachment" href="/uploads/default/original/3X/7/4/741534a660c77d52cab91beb9162e22607b9f68b.kmmacros">Use Dynamic Variable Names [Example].kmmacros</a> (6.8 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**

---



![image|591x1477](upload://36sWtAy6dr1oUMhGQcJAXPfhFBX.jpg)
3 Likes