# Help With Paramaterization to Write to Tags

**URL:** <https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 23, 2025, 11:11pm UTC](https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489 "2025-04-23T23:11:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![basilcreeker](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@basilcreeker](https://forum.inductiveautomation.com/u/basilcreeker)\
**Post date:** [April 23, 2025, 11:11pm UTC](https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489/1 "2025-04-23T23:11:22Z")

</div>

Hello- I am seeking assistance in parameterizing my script to write to a tag. Essentially, I am making a pop-up with a button that I need to write a "1" or "True" value to tag TK2106Recirc.StartButton (boolean). TK2106Recirc is a UDT I created (with OPC read/write permissions), which may be causing my issues as I have not run into this issue with other tags.

When I "Copy Tag Path" from my tag browser, this is what I get: [default]Recirc/TK2106Recirc

Image 1: Parameters for the view that my button is on

 ![Screenshot 2025-04-23 at 4.00.25 PM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/9/3911a65b8a059da4decf99e637b88d454903b223.png)

Image 2: Non-paramaterized script that successfully writes to my tag (I've tried both 1 and True as my script value, and I've tried both system.tag.write & system.tag.writeBlocking)

 ![Screenshot 2025-04-23 at 4.05.08 PM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/8/c86f638cfd1f8663e0d45dfda57df89d17ac5620.png)

Image 3: Parameterized script that does NOT write to my tag (I've tried both 1 and True as my script value, and I've tried both system.tag.write & system.tag.writeBlocking)

 ![Screenshot 2025-04-23 at 4.06.06 PM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/8/a8539fa00e1bcd935a973fa6bd18a2f4a6040028.png)

Any help would be much appreciated and I can provide any further info as necessary. Thank you in advance! (:

---

<div class="post-metadata">

**Author:** ![Simon\_Hathout\_Willar](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Simon\_Hathout\_Willar](https://forum.inductiveautomation.com/u/Simon_Hathout_Willar)\
**Post date:** [April 23, 2025, 11:29pm UTC](https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489/2 "2025-04-23T23:29:03Z")

</div>

Can you check that the two strings == each other?

I cannot see a single reason why this shouldn't work the exact same, a String is a String to python...

---

<div class="post-metadata">

**Author:** ![basilcreeker](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@basilcreeker](https://forum.inductiveautomation.com/u/basilcreeker)\
**Post date:** [April 23, 2025, 11:31pm UTC](https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489/3 "2025-04-23T23:31:47Z")

</div>

Yes they are the same, I am not sure what I am missing here

---

<div class="post-metadata">

**Author:** ![Simon\_Hathout\_Willar](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Simon\_Hathout\_Willar](https://forum.inductiveautomation.com/u/Simon_Hathout_Willar)\
**Post date:** [April 23, 2025, 11:39pm UTC](https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489/4 "2025-04-23T23:39:50Z")

</div>

so the statements

```python
rawStr = "[default]Recirc/TK2106Recirc/StartButton" 
builtStr = self.view.params.path + "/Startbutton"
system.perspective.print(rawStr == builtStr)
system.perspective.print(type(rawStr))
system.perspective.print(type(builtStr))

```

print true, class org.python.core.PyString, class org.python.core.PyString?

If that is the case, I have absolutely no clue what could be going wrong.  
If it isn't the case, there could be some weirdness around the string being held as a perspective property being a slightly different type (eg, a qualified value, or unicode/not unicode)

---

<div class="post-metadata">

**Author:** ![basilcreeker](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@basilcreeker](https://forum.inductiveautomation.com/u/basilcreeker)\
**Post date:** [April 23, 2025, 11:51pm UTC](https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489/5 "2025-04-23T23:51:20Z")

</div>

Ahhh I see what you mean thank you, this is what I get when I try that:

true, class org.python.core.PyString, and class org.python.core.PyUnicode

I am not sure what other syntax to try- any pointers? Thank you so much! 🙂

---

<div class="post-metadata">

**Author:** ![Simon\_Hathout\_Willar](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Simon\_Hathout\_Willar](https://forum.inductiveautomation.com/u/Simon_Hathout_Willar)\
**Post date:** [April 24, 2025, 12:07am UTC](https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489/6 "2025-04-24T00:07:14Z")

</div>

try to cast the string to be a base python string?

```python
builtStr = str(self.view.params.path + "/Startbutton")
system.perspective.print(builtStr)
system.tag.writeBlocking(builtStr, True)

```

It would be weird if the tag write method didn't work with unicode strings, but stranger things have happened.

Also for read blocking, you could try making each element be a list, like

```python
system.tag.writeBlocking([builtStr], [True])

```

---

<div class="post-metadata">

**Author:** ![basilcreeker](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@basilcreeker](https://forum.inductiveautomation.com/u/basilcreeker)\
**Post date:** [April 24, 2025, 12:31am UTC](https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489/7 "2025-04-24T00:31:49Z")

</div>

I just tried that but same results- I have found that if I test the button in active view in preview mode, it successfully works (with the parameterized tag). When I launch a session in my browser, it is unsuccessful

---

<div class="post-metadata">

**Author:** ![basilcreeker](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@basilcreeker](https://forum.inductiveautomation.com/u/basilcreeker)\
**Post date:** [April 24, 2025, 1:14am UTC](https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489/8 "2025-04-24T01:14:10Z")

</div>

I think this may be contributing to the issue- I have an initial text "RECIRC" button that opens the popup. The popup has two buttons: "Start" & "Stop." The view that has the parameters defined to it is the popup window. I think that the parameter is not being passed through from the initial text when I test it on the browser. Any ideas on how to effectively accomplish this?

---

<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:** [April 24, 2025, 10:10am UTC](https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489/9 "2025-04-24T10:10:19Z")

</div>

What's the script that opens your popup?

---

<div class="post-metadata">

**Author:** ![basilcreeker](https://avatars.discourse-cdn.com/v4/letter/b/90db22/32.png) [@basilcreeker](https://forum.inductiveautomation.com/u/basilcreeker)\
**Post date:** [April 24, 2025, 9:56pm UTC](https://forum.inductiveautomation.com/t/help-with-paramaterization-to-write-to-tags/105489/10 "2025-04-24T21:56:08Z")

</div>

I am using the Popup\_PB as shown:

 ![Screenshot 2025-04-24 at 2.55.27 PM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/e/8e4f11cc8994025965fbb05cc1c560179213f152.png)
