# How to use Client tags in scripts

**URL:** <https://forum.inductiveautomation.com/t/how-to-use-client-tags-in-scripts/6155>\
**Category:** Ignition\
**Created:** [April 4, 2013, 1:45pm UTC](https://forum.inductiveautomation.com/t/how-to-use-client-tags-in-scripts/6155 "2013-04-04T13:45:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brett\_Yeomans](https://avatars.discourse-cdn.com/v4/letter/b/35a633/32.png) [@Brett\_Yeomans](https://forum.inductiveautomation.com/u/Brett_Yeomans)\
**Post date:** [April 4, 2013, 1:45pm UTC](https://forum.inductiveautomation.com/t/how-to-use-client-tags-in-scripts/6155/1 "2013-04-04T13:45:28Z")

</div>

Hi,  
I want to use Client tags for the first time but have come up against a problem. If I put this code:

value = system.tag.read(’[Client]SerialScales/weight1’)  
system.tag.writeToTag(’[Client]SerialScales/weight2’, value)

in a button (I actually want it in a script) I get the error message “Cannot nest tagValues”.  
I am trying to use the client tags as holding places for data so a client script can get values from them and write values back (have client serial scales and need to take 3 weighments before INSERTing into SQL)

this code would work:

value = 289.55  
system.tag.writeToTag(’[Client]SerialScales/weight2’, value)

---

<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 4, 2013, 2:11pm UTC](https://forum.inductiveautomation.com/t/how-to-use-client-tags-in-scripts/6155/2 "2013-04-04T14:11:01Z")

</div>

system.tag.read() returns a QualifiedValue object, so you’ll need to get the value out of the QV before you write with it.

```auto
qv = system.tag.read('...')
system.tag.write('...', qv.value)
```

You can also get the quality and timestamp from the QV.
