# Write Tag with Custom Property

**URL:** <https://forum.inductiveautomation.com/t/write-tag-with-custom-property/81998>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [November 16, 2023, 4:58pm UTC](https://forum.inductiveautomation.com/t/write-tag-with-custom-property/81998 "2023-11-16T16:58:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [November 16, 2023, 4:58pm UTC](https://forum.inductiveautomation.com/t/write-tag-with-custom-property/81998/1 "2023-11-16T16:58:20Z")

</div>

I have a custom property on a tag. Wondering if I would be able to change the value of this custom property using a script, and how I would go about doing so.

Something like `system.tag.writeBlocking(['[default]pathToTag/tag/customINT])`?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 16, 2023, 5:05pm UTC](https://forum.inductiveautomation.com/t/write-tag-with-custom-property/81998/2 "2023-11-16T17:05:22Z")

</div>

`system.tag.writeBlocking(['[default]pathToTag/tag.customINT], [value])`

Should work.

---

<div class="post-metadata">

**Author:** ![amarks](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/amarks/32/45610_2.png) [@amarks](https://forum.inductiveautomation.com/u/amarks)\
**Post date:** [November 16, 2023, 5:06pm UTC](https://forum.inductiveautomation.com/t/write-tag-with-custom-property/81998/3 "2023-11-16T17:06:57Z")

</div>

And reading, would `.customINT` be part of the qualified value or would it need to read separately in `system.tag.readBlocking()`?

So

```auto
custom, tag = [QV.value for QV in system.tag.readBlocking(['[default]pathToTag/Tag.customINT','[default]pathToTag/Tag'])]

```

or

```auto
tag_qv = system.tag.readBlocking(['[default]pathToTag/Tag'])]

tag_val = tag_qv.Value
tag_custom = tag_qv.customINT

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 16, 2023, 5:19pm UTC](https://forum.inductiveautomation.com/t/write-tag-with-custom-property/81998/4 "2023-11-16T17:19:48Z")

</div>

Read separately.

Technically, you could read `path/to/tag.jsonValues` and get a rich document you can extract the `value` and custom property nodes from in one call, but I wouldn't both if you just want two values.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 16, 2023, 5:22pm UTC](https://forum.inductiveautomation.com/t/write-tag-with-custom-property/81998/5 "2023-11-16T17:22:53Z")

</div>

If you really want to get fancy, maybe something like this:

```auto

def readWithProperties(path, *properties):
	props = ["value"]
	props.extend(properties)
	paths = ["path.{}".format(property) for property in props]
	return [QV.value for QV in system.tag.readBlocking(paths)]

tag, custom = readWithProperties("[default]pathToTag/Tag", "customINT")

```
