# system.tag.writeAll Issue

**URL:** <https://forum.inductiveautomation.com/t/system-tag-writeall-issue/24125>\
**Category:** Ignition\
**Created:** [April 14, 2019, 4:06pm UTC](https://forum.inductiveautomation.com/t/system-tag-writeall-issue/24125 "2019-04-14T16:06:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leeroy](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@leeroy](https://forum.inductiveautomation.com/u/leeroy)\
**Post date:** [April 14, 2019, 4:06pm UTC](https://forum.inductiveautomation.com/t/system-tag-writeall-issue/24125/1 "2019-04-14T16:06:44Z")

</div>

Hi,

**I have tags that i want to write to other tags with a button… the scipt is on the action performed**

[CODE]  
tags = ["[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1/SPT\_1\_","[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1/SPT\_2\_"]  
values = ["[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1\_MEM/SPT\_1\_M","[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1\_MEM/SPT\_2\_M"]  
values = system.tag.writeAll(tags,values)

[CODE/]

**Problem is for some reason it’s not working like that but when i use(the following script)it’s working fine.Can we use tags as value for this? or it has to be hard coded values ?**  
**Thanks**

[CODE]  
tags = ["[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1/SPT\_1\_","[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1/SPT\_2\_"]  
values = [150,102]  
values = system.tag.writeAll(tags,values)

[CODE/]

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 14, 2019, 4:16pm UTC](https://forum.inductiveautomation.com/t/system-tag-writeall-issue/24125/2 "2019-04-14T16:16:00Z")

</div>

You need to read the values from the other tags whose values you want with `system.tag.readAll` (and get the `.value` out of the `QualifiedValue` you get).

---

<div class="post-metadata">

**Author:** ![leeroy](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@leeroy](https://forum.inductiveautomation.com/u/leeroy)\
**Post date:** [April 14, 2019, 4:51pm UTC](https://forum.inductiveautomation.com/t/system-tag-writeall-issue/24125/3 "2019-04-14T16:51:49Z")

</div>

so I need to do for exemple

tagsr = ["[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1\_MEM/SPT\_1\_M","[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1\_MEM/SPT\_2\_M"]  
valuesr = system.tag.readAll(tagsr)

and then what ? sorry for the newbie question i’m new to scripting …

---

<div class="post-metadata">

**Author:** ![leeroy](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@leeroy](https://forum.inductiveautomation.com/u/leeroy)\
**Post date:** [April 14, 2019, 5:12pm UTC](https://forum.inductiveautomation.com/t/system-tag-writeall-issue/24125/4 "2019-04-14T17:12:52Z")

</div>

I finaly found the solution

tagsr = ["[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1\_MEM/SPT\_1\_M","[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1\_MEM/SPT\_2\_M"]  
valuesr = system.tag.readAll(tagsr)

tags = ["[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1/SPT\_1\_","[Master\_par\_Tags]Batching/A220/AGT SPT/AGT1/SPT\_2\_"]  
values = [valuesr[0].value,valuesr[1].value]  
values = system.tag.writeAll(tags,values)

Thanks for your help
