# Expression Tag Missevaluating Tag in Script

**URL:** <https://forum.inductiveautomation.com/t/expression-tag-missevaluating-tag-in-script/112826>\
**Category:** Ignition\
**Tags:** perspective, ignition81, scripting\
**Created:** [December 15, 2025, 9:28pm UTC](https://forum.inductiveautomation.com/t/expression-tag-missevaluating-tag-in-script/112826 "2025-12-15T21:28:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![richhull](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@richhull](https://forum.inductiveautomation.com/u/richhull)\
**Post date:** [December 15, 2025, 9:28pm UTC](https://forum.inductiveautomation.com/t/expression-tag-missevaluating-tag-in-script/112826/1 "2025-12-15T21:28:35Z")

</div>

So I have this OPC tag that returns the current position of a cart, however, when I try to use this tag in a separate expression tag, the value and datatype of the tag completely changes.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/7/77613591a2fe25ace2f50a793e8299395b425bf5.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/8/685b06d5e090c11828122529a55285a269390458.png)

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/f/afb291bbb11d507f5477f95b0cbab362a6616e06.png)

I have tried everything commented out however the value of New Tag remains 2, even when the Current\_Position value changes! The datatype of the Current\_Position tag is an Integer, but the expression returns Long. Is there any way to correct this or go about this?

Thank You

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 15, 2025, 9:38pm UTC](https://forum.inductiveautomation.com/t/expression-tag-missevaluating-tag-in-script/112826/2 "2025-12-15T21:38:09Z")

</div>

When you right-click, `Copy Path` on the Current\_Position tag, what do you get?

It looks to me like you might have copied the path to one of the tags belonging to a UDT _definition_, not the instance.

---

<div class="post-metadata">

**Author:** ![richhull](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@richhull](https://forum.inductiveautomation.com/u/richhull)\
**Post date:** [December 15, 2025, 9:43pm UTC](https://forum.inductiveautomation.com/t/expression-tag-missevaluating-tag-in-script/112826/3 "2025-12-15T21:43:37Z")

</div>

Yep that looks like it was the problem! Thank you!
