stublito Posted May 15, 2008 Posted May 15, 2008 (edited) 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, 2008 by Guest
comment Posted May 15, 2008 Posted May 15, 2008 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.
stublito Posted May 16, 2008 Author Posted May 16, 2008 Thank you! It looks like FMP 9 checks that box by default, FMP 6 did not. Peter
Recommended Posts
This topic is 6095 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now