How do I write a indirect tag write tag script?

How do I write a indirect tag write tag script? I am having trouble with the above example.

Thanks!

You just build your tag path as a string and use that in the system.tag.write call.

system.tag.write(myBuiltTagPath, valueToWrite)

Does it make a difference on what type of button I use to script it to?

It does matter, for general purposes a button will be ok. If writing to a PLC, for example, is advisable to use another type of button. You can always look up in the user manual.
And scripts should work ok independently the button type.

A post was split to a new topic: Indirect tag write from scripting