# Script Syntax writing to a tag

**URL:** <https://forum.inductiveautomation.com/t/script-syntax-writing-to-a-tag/78029>\
**Category:** Ignition\
**Created:** [August 17, 2023, 8:48pm UTC](https://forum.inductiveautomation.com/t/script-syntax-writing-to-a-tag/78029 "2023-08-17T20:48:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan\_mueller](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@dan\_mueller](https://forum.inductiveautomation.com/u/dan_mueller)\
**Post date:** [August 17, 2023, 8:48pm UTC](https://forum.inductiveautomation.com/t/script-syntax-writing-to-a-tag/78029/1 "2023-08-17T20:48:33Z")

</div>

Can I write directly to the tag P1 using a tag instead of assigning current \_count = Hour\_actual0? I want to write Hour\_actual0 to P1 directly

```auto
if currentValue.value == 5:
		current_count = system.tag.readBlocking("[.]Hour_Actual0")[0].value
		system.tag.writeBlocking(["[.]P1"], [current_count])

```

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [August 17, 2023, 8:53pm UTC](https://forum.inductiveautomation.com/t/script-syntax-writing-to-a-tag/78029/2 "2023-08-17T20:53:14Z")

</div>

You should be able to.

```auto
if currentValue.value == 5:
	system.tag.writeBlocking(["[.]P1"], [system.tag.readBlocking("[.]Hour_Actual0")[0].value])

```

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [August 17, 2023, 9:39pm UTC](https://forum.inductiveautomation.com/t/script-syntax-writing-to-a-tag/78029/3 "2023-08-17T21:39:42Z")

</div>

Don't even need to break out the value, as the `system.tag.write*` functions will accept a list of `QualifiedValues`.

```auto
if currentValue.value == 5:
    system.tag.writeBlocking(['[.]P1'],[system.tag.readBlocking('[.]Hour_Actual0')])

```

Though, I would be definitely do this with `system.tag.writeAsync()` if not an expression tag and a driven tag group.
