You are viewing limited content. For full access, please sign in.

Question

Question

workflow - How to evaluate negative numbers with a condition

asked on October 16, 2017

Hello everyone, 

I have a WF that makes a calculation between an invoice amount and a GL amount. The problem is with the condition I have setup after the calculation. This is how I have it setup;

WF evaluated it like this;

As you can see, it thought 0.00 is less than -20.00. I'm sure there is something I'm missing to get it to understand negative numbers. Thanks for the help.  

0 0

Answer

SELECTED ANSWER
replied on October 16, 2017

99.99% what Miruna said is what you're facing here.

If you left the token with the default "String" tag, then the evaluation doesn't view it as a number; in programming terms '0.00' < '-20.00' like you're sorting text.

However, if you apply the Number tag, then 0.00 > -20.00

1 0

Replies

replied on October 16, 2017

Is your Amount Diff token in Token Calculator tagged as number or text?

3 0
SELECTED ANSWER
replied on October 16, 2017

99.99% what Miruna said is what you're facing here.

If you left the token with the default "String" tag, then the evaluation doesn't view it as a number; in programming terms '0.00' < '-20.00' like you're sorting text.

However, if you apply the Number tag, then 0.00 > -20.00

1 0
replied on October 16, 2017

yep, defaulted to string. Changed the token tag to number and we are good to go. I was just reading about that so thank you for clarifying. 

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.