# Convert bound tag to string for script use

**URL:** <https://forum.inductiveautomation.com/t/convert-bound-tag-to-string-for-script-use/110250>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [August 28, 2025, 6:11pm UTC](https://forum.inductiveautomation.com/t/convert-bound-tag-to-string-for-script-use/110250 "2025-08-28T18:11:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rchallacombe](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rchallacombe/32/81306_2.png) [@rchallacombe](https://forum.inductiveautomation.com/u/rchallacombe)\
**Post date:** [August 28, 2025, 6:11pm UTC](https://forum.inductiveautomation.com/t/convert-bound-tag-to-string-for-script-use/110250/1 "2025-08-28T18:11:18Z")

</div>

I have a component with a custom property bound to a tag.

When the component is clicked on, I want to script it such that I can get the tag from `event.source.myCustomProperty` and use it in a function such as `system.tag.writeBlocking()` which requires a string tag path.

If I do `system.tag.writeBlocking(event.source.myCustomProperty, stuffToWrite)` it doesn't work, I believe because I need to convert the tag that is given by `event.source.myCustomProperty` to a string.

I feel like this boils down to converting a tag to a string. How to do this?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 28, 2025, 6:18pm UTC](https://forum.inductiveautomation.com/t/convert-bound-tag-to-string-for-script-use/110250/2 "2025-08-28T18:18:18Z")

</div>

Is `.myCustomProperty` **bound** to a tag so it gets the tag **value**?

If so, then no, there's no documented way to get its tag path. (There is undocumented, non-trivial use of the window's `InteractionController` to do so, but you are on your own.)

Typically, if you expect to need the path for a tag that you are going to bind, you should plan on placing that tag **path** string in a window parameter or template parameter, and using indirect tag binding where you need the tag **value**. Then anywhere you need the string for other reasons, you can get it from the parameter.

---

<div class="post-metadata">

**Author:** ![rchallacombe](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/rchallacombe/32/81306_2.png) [@rchallacombe](https://forum.inductiveautomation.com/u/rchallacombe)\
**Post date:** [August 28, 2025, 6:21pm UTC](https://forum.inductiveautomation.com/t/convert-bound-tag-to-string-for-script-use/110250/3 "2025-08-28T18:21:53Z")

</div>

Yes, bound to a tag to get tag value, such as `{[default]_tagDir/tag}.`

Your suggestion is essentially what my work around does. I just felt like there had to be a better way.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 28, 2025, 6:34pm UTC](https://forum.inductiveautomation.com/t/convert-bound-tag-to-string-for-script-use/110250/4 "2025-08-28T18:34:21Z")

</div>

> [@rchallacombe](#):
>
> I just felt like there had to be a better way.

Using tag path string parameters throughout your projects is crucial to producing re-usable UI assemblies, whether formally as templates or not.

This **is** the better way.
