# Action Performed set tag value: can you use indirect tag

**URL:** <https://forum.inductiveautomation.com/t/action-performed-set-tag-value-can-you-use-indirect-tag/12760>\
**Category:** Ignition\
**Created:** [March 7, 2017, 11:08pm UTC](https://forum.inductiveautomation.com/t/action-performed-set-tag-value-can-you-use-indirect-tag/12760 "2017-03-07T23:08:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwaynesmith](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mwaynesmith](https://forum.inductiveautomation.com/u/mwaynesmith)\
**Post date:** [March 7, 2017, 11:08pm UTC](https://forum.inductiveautomation.com/t/action-performed-set-tag-value-can-you-use-indirect-tag/12760/1 "2017-03-07T23:08:10Z")

</div>

Can one use indirect tags in the ‘set tag value’ tag under Action Performed? I do not understand the syntax. Other functions are much straight forward with links to tags and component properties.

---

<div class="post-metadata">

**Author:** ![abishur](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/abishur/32/9096_2.png) [@abishur](https://forum.inductiveautomation.com/u/abishur)\
**Post date:** [March 8, 2017, 3:31pm UTC](https://forum.inductiveautomation.com/t/action-performed-set-tag-value-can-you-use-indirect-tag/12760/2 "2017-03-08T15:31:58Z")

</div>

in the expression builder the way you would use indirect tag binding is with the tag expression. For example, if you had the tags “Bob1\_extension”, “Bob2\_extension”, and “Bob3\_extension” in a folder called “myFolder” then in the expression builder (that’s your action performed script editor area) then you could reference any tag using the tag expression like this:

```auto
tag("myFolder/Bob1_extension")
```

To make it dynamic lets say you had a custom property called BobNum that was either 1, 2, or 3. Then you could create the tag path like so

```auto
tag("myFolder/Bob" + {Root Container.BobNum} + "_extension"
```

Note, on a template, instead of it being Root Container, it will be the name of your template.

Now all that said, what I typically do is create a Template Parameter Custom Property named something like “BaseName” that’s a string. Then I assign to that tag the base tag path I.e. “myFolder/Bob1” or “myFolder/Bob2”. Then I create a Internal Property Custom Property for each of my extensions that I bind using the indirect tag binding method (i.e. {1}\_extension with the {1} bound to Root Container.BaseName) Then I can directly reference the custom property in my scripts.

Ideally this results in less scripts having to execute, instead of it having to execute the tag() expression to evaluate a script it just looks at the bound tag. At the very least it makes for much cleaner scripts that are easier to read.

---

<div class="post-metadata">

**Author:** ![mwaynesmith](https://avatars.discourse-cdn.com/v4/letter/m/eb8c5e/32.png) [@mwaynesmith](https://forum.inductiveautomation.com/u/mwaynesmith)\
**Post date:** [March 8, 2017, 8:45pm UTC](https://forum.inductiveautomation.com/t/action-performed-set-tag-value-can-you-use-indirect-tag/12760/3 "2017-03-08T20:45:10Z")

</div>

Thanks. This is our first ignition project so learning a lot as we go. You cleaned up the expression for me.
