Usually, when a text box has the text format "Number" and Decimal Digits 2, you get something like "13.34" as a result.
Now, if a character is put in front, the result is e.g. "A13.34" - so the format works, and the character is shown. However, if a plus-sign (+) is used instead of the character, this is eliminated whenever the number is positive (result: 13.34). If the number is negative I get "+-13.34". How is it possible to show e.g. "+13.34" and keep the text format a number? The idea would be to add a plus whenever the number is positive and if it is negative keep it as it is.
"+" character in a number-formatted text box
-
- Posts: 6247
- Joined: Tue Mar 20, 2018 5:34 am
Re: "+" character in a number-formatted text box
Hello,
You can use the Format function:
{String.Format("+{0:N2}",Variable1)}
Thank you.
You can use the Format function:
{String.Format("+{0:N2}",Variable1)}
Thank you.
Re: "+" character in a number-formatted text box
Yes, this works as intended (text format in this case has to be "General" of course). Thank you!
-
- Posts: 6247
- Joined: Tue Mar 20, 2018 5:34 am
Re: "+" character in a number-formatted text box
Hello,
You are welcome.
You are welcome.