The FileMaker IsEmpty Function

The IsEmpty function is a developer favorite, as is its opposite, Not IsEmpty.  Quite often a developer will test a field for any content to ascertain the status of a record:  someone who has responded, or it active in an organization, for example.

IsEmpty
IsEmpty( field)
FMP Version: All Current Versions Of FileMaker

This function checks to see if a specified field is empty or not. If the field is empty, it returns a TRUE. This function is usually used inside of another logical function like Case or IF. For example, you might have a calculation that checks to see if someone has ever donated money to your cause. If the sum of their donations is empty and they are in your contact database, they are a friend. If they have donated money, they are a donor.

Case( IsEmpty(SumDonations), “Friend”, “Donor”)

FYI… FLIPPING THE RESULT WITH THE NOT OPERATOR
The NOT operator is designed to reverse the truth about a statement. This is kind of like two surfers talking “You were awesome dude, NOT!” It’s the same thing with this function, you are giving a statement and then declaring it the opposite of it’s intent. If you are giving a true statement, the NOT reverses it to false. If you are giving a false statement, the NOT reverses it to true.

A similar function for testing if a related record exists is the IsValid function.  Run this function on the foreign key in the related table.  If the key exists, then the function returns 1 (True).  It will also test for field content mismatches, such as text only in number field.

Visit the link below to learn how to use the Not expression in conjunction with the IsEmpty function (and the IsValid) function, for that matter).

Dwayne Wright PMP, PMI-ACP, CSM – FileMaker Thoughts – The FileMaker IsEmpty Function.

Liked Liked
Need FileMaker Development Help? Or to purchase FileMaker Software?
Contact FM Pro Gurus for help