# Replacing tags

**URL:** <https://forum.inductiveautomation.com/t/replacing-tags/6868>\
**Category:** Ignition\
**Created:** [July 15, 2013, 7:25pm UTC](https://forum.inductiveautomation.com/t/replacing-tags/6868 "2013-07-15T19:25:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregC](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gregC](https://forum.inductiveautomation.com/u/gregC)\
**Post date:** [July 15, 2013, 7:25pm UTC](https://forum.inductiveautomation.com/t/replacing-tags/6868/1 "2013-07-15T19:25:49Z")

</div>

I am attempting to relace a few tags with other tags. This is probably a simple scripting command but I can’t seem to find it. For example, when I press a button I want tags 1,2,3, and 4 to be replaced with tags 5,6,7, and 8.

Thanks.

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [July 15, 2013, 9:10pm UTC](https://forum.inductiveautomation.com/t/replacing-tags/6868/2 "2013-07-15T21:10:54Z")

</div>

are you talking about taking the values from those tags and putting them in the other tags or actually replacing the tag paths on a component or renaming the tags to different names?

---

<div class="post-metadata">

**Author:** ![gregC](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gregC](https://forum.inductiveautomation.com/u/gregC)\
**Post date:** [July 15, 2013, 9:32pm UTC](https://forum.inductiveautomation.com/t/replacing-tags/6868/3 "2013-07-15T21:32:43Z")

</div>

I need to replace the tag path tied to a component. When I navigate to a “change” screen I want certain tags to be tied to the components on that screen. And when I navigate to the same “change” screen using a different button, it will bring it’s own tags along with it.

I believe I need something along these lines:  
but to change the “replace” and “system.tag.writeToTag” with the appropriate swap commands

value = ‘AF Chamber Pressure’  
system.tag.writeToTag(“Memory Tags/1”, value)

replace = “_Tags_/Global/AF\_Chmbr\_Prs/SP\_active”  
system.tag.writeToTag(“Memory Tags/2”, replace)

replace = “_Tags_/Global/AF\_Chmbr\_Prs/SP\_req”  
system.tag.writeToTag(“Memory Tags/3”, replace)

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![gregC](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gregC](https://forum.inductiveautomation.com/u/gregC)\
**Post date:** [July 15, 2013, 9:38pm UTC](https://forum.inductiveautomation.com/t/replacing-tags/6868/4 "2013-07-15T21:38:58Z")

</div>

This is the type of Parameter I am trying to recreate in Ignition.

! Parameter files are used with graphic displays to specify the tags a  
! display uses at runtime. The parameter file is passed to the graphic  
! using the /P option of the Display command.  
! Syntax:  
! #replacement=tagname  
! Example:  
! #23=A\_COLOR  
! #23 in any expression in a graphic would be replaced by the tag A\_COLOR.

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [July 15, 2013, 10:55pm UTC](https://forum.inductiveautomation.com/t/replacing-tags/6868/5 "2013-07-15T22:55:35Z")

</div>

yes you want to use indirects

[inductiveautomation.com/supp … /ignition/](http://www.inductiveautomation.com/support/usermanuals/ignition/)

also you can look at some of the ignition training videos on the website, but I think you will need to get a password from your account rep.  
[inductiveautomation.com/support/videos/5](http://www.inductiveautomation.com/support/videos/5)

also youtube has a few examples

[youtube.com/watch?v=ZwIZc2uBZ3k](http://www.youtube.com/watch?v=ZwIZc2uBZ3k)

[youtube.com/watch?v=6-L88zcjw3Q](http://www.youtube.com/watch?v=6-L88zcjw3Q)
