Brian Dunning's FileMaker Custom Functions

isNull ( text )

Checks to see if the input is NULL

  Average rating: 4.6 (26 votes) Log in to vote

Derek Bastille   Derek Bastille - Show more from this author
University of Alaska Fairbanks

Share on Facebook Share on Twitter

  Sample input:
$foo = Null
isNull($foo)
$foo = ""
isNull($foo)
  Sample output:
1
0

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This is the companion function to Null. It can be used to check to see if a variable, string, etc. has been set to the value NULL. This can be very useful when testing input values that might be empty or when returning an error condition from a script or expression. I frequently use it in conjunction with get(ScriptParameter). As in:

Let(
in = get(ScriptParameter);

if( in = ""; Null; in)
)

Later, if I set a variable to NULL, then the variable won't 'disappear' like it would if I set it to ""

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: