Hello,
I am currently working on a workflow and am in need of some assistance. I want to run a test to see whether a value is above a certain threshold. The function that I am using is as follows:
If [Value] >= "470" then "1" else "0" endif
It seems like an easy function to use, but for some reason it isn't properly functioning. For certain values, it gets me a 0 while it should send back a 1. Certain values are listed below as reference:
Value Test
1610 0
2552 0
738 1
516 1
988 1
4 0
306 0
Not sure if there is a better formula to use for this situation. Any assistance in resolving this problem would be greatly appreciated!
Solved! Go to Solution.
Make sure the [Value] field is formatted as a numeric field. When a field is a string type, the characters are evaluated in a sequential order (think alphabetic methodology, but with numbers).
@CharlieS is on the right track, but I know that he's right! The > "470" proves it.
please do either convert to a number (e.g. INT16) or use:
If ToNumber([Value]) >= 470 then "1" else "0" endif
Cheers,
Mark
P.S. If this new variable is a BYTE, then:
If ToNumber([Value]) >= 470 then 1 else 0 endif
That worked! Thank you so @CharlieS and @MarqueeCrew for your assistance.