I am trying to write a rule as follows
dollar(ri!number)>0 for validating the dollar value to be greater than zero. But its always resulting false.
Can someone suggest whats the logic behind it? I had a thought that Appian is considering dollar value as text , and treating text is less than a number.
Discussion posts and replies are publicly visible
Hi,dollar function definition says it return text so you can not compare text with 0 integer value,For above scenario you can use todecimal(dollar(ri!number))>0
if you use tointeger(dollar(0.50))>0 will return false which is not correct
todecimal(dollar(0.01))>0 will return true which is correct
Hi rohinip91, Try with this expression tointeger(dollar(ri!number))>0 For more info about this function follow the below link docs.appian.com/.../fnc_text_dollar.html
If you are trying to determine whether the system is going to render your number as zero, which might happen with say .0042 dollars, you would want to check using the rounding functions. round() by default does the same rounding the dollar() function does, but leaves the number a number so you can test. So, IF round(ri!number) > 0, then dollar(ri!number)