# Error trying to coerce text to number

**URL:** <https://forum.inductiveautomation.com/t/error-trying-to-coerce-text-to-number/116834>\
**Category:** Ignition\
**Created:** [August 19, 2026, 3:35pm UTC](https://forum.inductiveautomation.com/t/error-trying-to-coerce-text-to-number/116834 "2026-08-19T15:35:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex.ferrell](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@alex.ferrell](https://forum.inductiveautomation.com/u/alex.ferrell)\
**Post date:** [August 19, 2026, 3:35pm UTC](https://forum.inductiveautomation.com/t/error-trying-to-coerce-text-to-number/116834/1 "2026-08-19T15:35:53Z")

</div>

I have a label with an expression binding: "Pallet ID: " + {Barcode Device Preview.Barcode::outReadString}. The outReadString member tag in the Barcode UDT is a string tag. If I have a number in there it works fine, but when I have text I get an error that is can't coerce it to a number. I don't know why it thinks it need to be a number. The string data looks fine in the tag itself. If I type in fixed text in the expression instead of the property the component looks fine.

---

<div class="post-metadata">

**Author:** ![Kevin\_Flener](https://avatars.discourse-cdn.com/v4/letter/k/74df32/32.png) [@Kevin\_Flener](https://forum.inductiveautomation.com/u/Kevin_Flener)\
**Post date:** [August 19, 2026, 3:50pm UTC](https://forum.inductiveautomation.com/t/error-trying-to-coerce-text-to-number/116834/2 "2026-08-19T15:50:47Z")

</div>

I don't have the answer to why.

But have you tried using the concat() function instead of +?

---

<div class="post-metadata">

**Author:** ![bobby.miller](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bobby.miller/32/85153_2.png) [@bobby.miller](https://forum.inductiveautomation.com/u/bobby.miller)\
**Post date:** [August 19, 2026, 3:51pm UTC](https://forum.inductiveautomation.com/t/error-trying-to-coerce-text-to-number/116834/3 "2026-08-19T15:51:48Z")

</div>

> [@alex.ferrell](#):
>
> {Barcode Device Preview.Barcode::outReadString}

Try toString({Barcode Device Preview.Barcode::outReadString})

---

<div class="post-metadata">

**Author:** ![alex.ferrell](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@alex.ferrell](https://forum.inductiveautomation.com/u/alex.ferrell)\
**Post date:** [August 19, 2026, 5:52pm UTC](https://forum.inductiveautomation.com/t/error-trying-to-coerce-text-to-number/116834/4 "2026-08-19T17:52:30Z")

</div>

I tried that and get the same error.

---

<div class="post-metadata">

**Author:** ![alex.ferrell](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@alex.ferrell](https://forum.inductiveautomation.com/u/alex.ferrell)\
**Post date:** [August 19, 2026, 5:54pm UTC](https://forum.inductiveautomation.com/t/error-trying-to-coerce-text-to-number/116834/5 "2026-08-19T17:54:02Z")

</div>

I get the same error using concat() function.

---

<div class="post-metadata">

**Author:** ![alex.ferrell](https://avatars.discourse-cdn.com/v4/letter/a/958977/32.png) [@alex.ferrell](https://forum.inductiveautomation.com/u/alex.ferrell)\
**Post date:** [August 19, 2026, 6:00pm UTC](https://forum.inductiveautomation.com/t/error-trying-to-coerce-text-to-number/116834/6 "2026-08-19T18:00:52Z")

</div>

I changed the template path and then changed it back and now it's all working as it is supposed to.

---

<div class="post-metadata">

**Author:** ![bobby.miller](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bobby.miller/32/85153_2.png) [@bobby.miller](https://forum.inductiveautomation.com/u/bobby.miller)\
**Post date:** [August 19, 2026, 6:49pm UTC](https://forum.inductiveautomation.com/t/error-trying-to-coerce-text-to-number/116834/7 "2026-08-19T18:49:23Z")

</div>

Lol, the ol' turn it off and turn it back on again! Glad you figured it out
