Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6095 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (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 by Guest
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.