# Text field is interpreting symbol "&" like concatenate (+)

**URL:** <https://forum.inductiveautomation.com/t/text-field-is-interpreting-symbol-like-concatenate/59524>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [May 12, 2022, 7:59pm UTC](https://forum.inductiveautomation.com/t/text-field-is-interpreting-symbol-like-concatenate/59524 "2022-05-12T19:59:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thiago\_Vilela](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/thiago_vilela/32/37352_2.png) [@Thiago\_Vilela](https://forum.inductiveautomation.com/u/Thiago_Vilela)\
**Post date:** [May 12, 2022, 7:59pm UTC](https://forum.inductiveautomation.com/t/text-field-is-interpreting-symbol-like-concatenate/59524/1 "2022-05-12T19:59:40Z")

</div>

Hello,

I have a Textfield (input), and I’m using it to get information from a barcode that returns something like this:

ab12345&xxx754xx&acd458www55

the problem after I press enter and try to get the value (text) self.props.text, the system is interpreting the symbol & like concatenates (+).  
How can I get this: ab12345&xxx754xx&acd458www55 ?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 12, 2022, 9:38pm UTC](https://forum.inductiveautomation.com/t/text-field-is-interpreting-symbol-like-concatenate/59524/2 "2022-05-12T21:38:21Z")

</div>

I’m not seeing the problem in a mock-up here.

![Ampersand in text](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/7/d77269e264e82e09ba7f871b77a8aef6e97c1cab.gif)

For the test I configured a script in the Text Field onKeyUp event:  
`self.getSibling("Label_0").props.text = self.props.text`  
This seems to pass through the string containing ampersands without difficulty.

Can you try to reproduce it? Maybe edit your question to include the Ignition version too.

---

<div class="post-metadata">

**Author:** ![Thiago\_Vilela](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/thiago_vilela/32/37352_2.png) [@Thiago\_Vilela](https://forum.inductiveautomation.com/u/Thiago_Vilela)\
**Post date:** [May 13, 2022, 12:08pm UTC](https://forum.inductiveautomation.com/t/text-field-is-interpreting-symbol-like-concatenate/59524/3 "2022-05-13T12:08:22Z")

</div>

Thanks for the answer, but the problem is happening after I press Enter and populate the information in another place ‘Label’ for example.  
What I’m doing is getting the information from the text field passing from Event onKeyDown , and executing a Query in SQL.  
I’m using Ignition 8.1.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [May 13, 2022, 2:12pm UTC](https://forum.inductiveautomation.com/t/text-field-is-interpreting-symbol-like-concatenate/59524/4 "2022-05-13T14:12:02Z")

</div>

I am unable to reproduce this within Ignition. What flavor of DB are you using? How are you calling the query?

In some flavors of DB the ‘&’ is a special character and may need to be escaped to be used as you are trying to use it.

---

<div class="post-metadata">

**Author:** ![Thiago\_Vilela](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/thiago_vilela/32/37352_2.png) [@Thiago\_Vilela](https://forum.inductiveautomation.com/u/Thiago_Vilela)\
**Post date:** [May 13, 2022, 5:02pm UTC](https://forum.inductiveautomation.com/t/text-field-is-interpreting-symbol-like-concatenate/59524/5 "2022-05-13T17:02:50Z")

</div>

Thanks for all answers.  
The real problem was with the scanner that I was using 🤦🏽‍♂️.  
Sorry.
