jfokas
Programmer
- Apr 28, 2002
- 42
- 0
- 0
I'm having trouble getting the formula below to work properly. Fields {a} and {b} are string fields and field {c} is numeric field. When {a} and {b} are null and {c} has a value, I want to see only "{c}". Instead I get "-{c}", which is consistent with OPTION 3. I've verified that {a} and {b} are indeed NULL and yet I do not get the desired OPTION 1. Can anyone tell me what is wrong with the logic in my formula?
Code:
IF ({c}<> 0 AND ISNULL({a}) AND ISNULL({b}))
THEN (ToText({c})) --OPTION 1
ELSE IF ({c}= 0 )
THEN ({a}+{b}) --OPTION 2
ELSE ({a}+{b}+ "-" +ToText({c})) --OPTION 3