Brian Dunning's FileMaker Custom Functions

ShowValue ( text ; altText )

Attempts to show a value, if it's empty, shows an alternate value

  Average rating: 4.8 (29 votes) Log in to vote

Chad Sager   Chad Sager
IT Solutions Consulting, Inc.
http://www.itsolutions-inc.com/Filemaker

Share on Facebook Share on Twitter

  Sample input:
ShowValue ( Student::LastName ; "No Last Name" )
  Sample output:
No Last Name

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

PURPOSE: to show a value if it exists and if not, use an alternate.

PARAMETERS:
text - the text you want to display
altText - an alternate text to show if the primary text is empty

IMPORTANT NOTES: remember if you want any or all the parameters to be empty, just use "" (double quotes)


EXAMPLES:

ShowValue ( Student::LastName ; "No Last Name" )

Will return an "No Last Name" When last name is Empty

ShowValue ( Student::LastName ; "No Last Name" )

Will return an "Smith" When last name is "Smith"

 

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 15 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: