# Writing to a tag from a user input

**URL:** <https://forum.inductiveautomation.com/t/writing-to-a-tag-from-a-user-input/75814>\
**Category:** Ignition\
**Tags:** scripting, ignition81\
**Created:** [July 1, 2023, 8:45pm UTC](https://forum.inductiveautomation.com/t/writing-to-a-tag-from-a-user-input/75814 "2023-07-01T20:45:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Morgan1](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@John\_Morgan1](https://forum.inductiveautomation.com/u/John_Morgan1)\
**Post date:** [July 1, 2023, 8:45pm UTC](https://forum.inductiveautomation.com/t/writing-to-a-tag-from-a-user-input/75814/1 "2023-07-01T20:45:52Z")

</div>

When I write to a tag a stored value (constant) It works fine but when I grab the data from a user (eg. spinner) It doesn't work

```auto
tag = "[default]setPoints/setPoint.value"

value = "event.source.parent.getComponent('Spinner').intValue"

system.tag.writeBlocking([tag],[value])

```

---

<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:** [July 1, 2023, 9:18pm UTC](https://forum.inductiveautomation.com/t/writing-to-a-tag-from-a-user-input/75814/2 "2023-07-01T21:18:11Z")

</div>

> [@John\_Morgan1](#):
>
> ```auto
> value = "event.source.parent.getComponent('Spinner').intValue"
> 
> ```

You are assigning that whole thing as a string to `value`. Take off the outer double quotes.

If this isn't Vision, you'll need to learn to copy and paste from compatible examples.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 2, 2023, 10:15am UTC](https://forum.inductiveautomation.com/t/writing-to-a-tag-from-a-user-input/75814/3 "2023-07-02T10:15:56Z")

</div>

> [@John\_Morgan1](#):
>
> `.value`

Also, this is implied if you don't include it, so easier to just leave it off

---

<div class="post-metadata">

**Author:** ![John\_Morgan1](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@John\_Morgan1](https://forum.inductiveautomation.com/u/John_Morgan1)\
**Post date:** [July 4, 2023, 12:13pm UTC](https://forum.inductiveautomation.com/t/writing-to-a-tag-from-a-user-input/75814/4 "2023-07-04T12:13:17Z")

</div>

Thank you for your help. It is a vision application.  
I have turned around the issue by using a memory tag as a middle layer.  
Wish you have a good day 😊

---

<div class="post-metadata">

**Author:** ![John\_Morgan1](https://avatars.discourse-cdn.com/v4/letter/j/22d042/32.png) [@John\_Morgan1](https://forum.inductiveautomation.com/u/John_Morgan1)\
**Post date:** [July 4, 2023, 12:14pm UTC](https://forum.inductiveautomation.com/t/writing-to-a-tag-from-a-user-input/75814/5 "2023-07-04T12:14:11Z")

</div>

I got it  
Thanks a lot 😊

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [July 4, 2023, 12:18pm UTC](https://forum.inductiveautomation.com/t/writing-to-a-tag-from-a-user-input/75814/6 "2023-07-04T12:18:06Z")

</div>

> [@John\_Morgan1](#):
>
> I have turned around the issue by using a memory tag as a middle layer.

What do you mean, middle layer ? You shouldn't need any middle layer.
