closed
Public

How do I add two numeric values from different text boxes and add them instead of concatenating ??

5 answers

Hi Richard,

You will need to assign the value of text box to an integer global property, then do the plus operation. Below is an example:

Make sure to have the “Set as Number” checkbox checked.

#1

This doesn’t work at all well. I have several numeric custom properties. When I add them together it does string concatenation. Very frustrating

#2

Hi Mark,

If your numeric properties are concatenated as string, that’s because the expression that stores the result is expecting a “string” type data.

Here is an example:

The message window will regard its message as string, so it will concatenate the properties as string. So message window on line 5 displays “1+2”. The workaround is to store the result in a temporary property before putting it into message window. The message window on line 7 is the example.

BTW, this thread is 3 years old. Next time please open a new thread for new discussion. Thank you.

#3

The custom property I’m using is defined as a numeric and I’m setting the text of a text box to {TextBox_Total} + {CurrentQty}

#4

That’s what I was saying 🙂

The text of text box is a string, so it will concatenates everything you give it.

The solution is to calculate two properties on a temporary numeric property. As shown in example above.

#5

This question is now closed