# Tag Replace Function

**URL:** <https://forum.inductiveautomation.com/t/tag-replace-function/12433>\
**Category:** Ignition\
**Created:** [December 6, 2016, 4:59pm UTC](https://forum.inductiveautomation.com/t/tag-replace-function/12433 "2016-12-06T16:59:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![conlonj25](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@conlonj25](https://forum.inductiveautomation.com/u/conlonj25)\
**Post date:** [December 6, 2016, 4:59pm UTC](https://forum.inductiveautomation.com/t/tag-replace-function/12433/1 "2016-12-06T16:59:08Z")

</div>

Does Ignition provide an easy way to replace all the tag binding on a single page with new tags? I’m looking for something similar to Intouch’s tag replace feature.

For example, I make a page for a single pump which contains tags specific to that pump (pump1\_run, pump1\_stop,etc.)

Now I wish to create an identical page for another pump. It should be a simple matter of copying the original page and replacing every instance of my pump1 tags with my pump2 tags. (pump1\_run becomes pump2\_run, pump1\_stop becomes pump2\_stop, etc.).

Unfortunately, the only way I can see to accomplish this is to manually go through each component on the page and change the bindings in the property editor. Does anyone know of a solution to this?

BTW, I am aware of the Find/Replace function, but, as far as I know, that serves a very different purpose.

Any help much appreciated.

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [December 6, 2016, 5:38pm UTC](https://forum.inductiveautomation.com/t/tag-replace-function/12433/2 "2016-12-06T17:38:31Z")

</div>

Hi there,

Ignition handles what you are describing in a different way. In Ignition you would handle this by using indirect bindings.

The idea here is to use the same window for different pumps – the binding changing depending on what pump you want to see. That way you don’t have to create multiple windows for the same functionality.

I suggest you watch this video about Indirect Tag Bindings:  
[inductiveuniversity.com/video/i … ag-binding](https://inductiveuniversity.com/video/indirect-tag-binding)

You can also read about Indirect Tag Bindings in the Ignition manual here: [docs.inductiveautomation.com/di … ag+Binding](https://docs.inductiveautomation.com/display/DOC79/Indirect+Tag+Binding)

Best,

---

<div class="post-metadata">

**Author:** ![conlonj25](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@conlonj25](https://forum.inductiveautomation.com/u/conlonj25)\
**Post date:** [December 7, 2016, 11:53am UTC](https://forum.inductiveautomation.com/t/tag-replace-function/12433/3 "2016-12-07T11:53:44Z")

</div>

Thanks very much. Still new to ignition so that’s a feature I’d missed completely. One more, small question.

Can I use indirect tags in a binding expression?

So, given a very simple expression “{PLC/CP2/pump1\_runs} && {PLC/CP2/pump1\_auto}”.  
I wish to copy this component and replace the tags for multiple pumps: “{PLC/CP2/pump2\_runs} && {PLC/CP2/pump2\_auto}”, etc.

Is this possible using indirect tag paths?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 7, 2016, 3:04pm UTC](https://forum.inductiveautomation.com/t/tag-replace-function/12433/4 "2016-12-07T15:04:36Z")

</div>

[quote=“conlonj25”]I wish to copy this component and replace the tags for multiple pumps: “{PLC/CP2/pump2\_runs} && {PLC/CP2/pump2\_auto}”, etc.[/quote]Indirect tag paths are really just strings, so you can create a computed tag path property with an expression that assembles the tag path the way you want (as a string) and then use that property in your indirect reference.

---

<div class="post-metadata">

**Author:** ![pphillips](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@pphillips](https://forum.inductiveautomation.com/u/pphillips)\
**Post date:** [December 7, 2016, 3:06pm UTC](https://forum.inductiveautomation.com/t/tag-replace-function/12433/5 "2016-12-07T15:06:10Z")

</div>

See [https://docs.inductiveautomation.com/display/DOC79/tag](https://docs.inductiveautomation.com/display/DOC79/tag)

---

<div class="post-metadata">

**Author:** ![nmudge](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nmudge/32/3394_2.png) [@nmudge](https://forum.inductiveautomation.com/u/nmudge)\
**Post date:** [December 7, 2016, 3:40pm UTC](https://forum.inductiveautomation.com/t/tag-replace-function/12433/6 "2016-12-07T15:40:39Z")

</div>

Hi conlonj25,

Yes, you can use indirect tag paths in expressions. You do this by using the tag expression function.

Here is an example:

```auto
tag("PLC/CP2/pump"+{Root Container.pumpNum}") && tag("PLC/CP2/pump"+{Root Container.pumpNum}+"_auto")
```

Best,
