May 15, 200817 yr In FMP 6, I used to be able to do (all number fields) (If(Field>"1","1","0") In FMP 9, the expression evaluates to "1" if Field is indeed greater than 1, but if Field is empty, I do not get a "0", I get a null value. I tried the inverse (If(Field="","0","1") I get the same result. What's up? Peter Edited May 15, 200817 yr by Guest
May 15, 200817 yr If you want to get a result when Field is empty, uncheck the "Do not evaluate if all referenced fields are empty" option. I don't think it worked any other way in version 6, too. BTW, if Field is a Number field, then you should compare it to a number, not to text (i.e. get rid of the quotes). And this: If ( Field > 1 ; 1 ; 0 ) can be written simply as: Field > 1 or, if you like: GetAsBoolean ( Field > 1 ) The last version will evaluate even if Field is empty and the option mentioned above remains checked.
May 16, 200817 yr Author Thank you! It looks like FMP 9 checks that box by default, FMP 6 did not. Peter
Create an account or sign in to comment