Brian Dunning's FileMaker Custom Functions

ShowValueCascade ( fields ; altText )

Given a text string of fields, it will return the first non-empty value, if all are empty, will return an alternate value

  Average rating: 4.4 (35 votes) Log in to vote

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

Share on Facebook Share on Twitter

  Sample input:
ShowValueCascade ( "Student::FirstName; Student::MiddleName; Student::NickName"; "The Student With No Name" )
  Sample output:
Lefty

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

PURPOSE: to show the first available value from a list of fields.

SPECIAL CONSIDERATIONS: it is assumed you are pointing to fields (or parameters) and the list of fields are separated by semicolons and the whole string is encapsulated in quotes


ShowValueCascade ( "firstChoice; { secondChoice; thirdChoice; fourthChoice...}"; altText)

given the field values:
Student::FirstName = (empty)
Student::MiddleName = "Joe"
Student::NickName = "Sticky"

ShowValueCascade ( "Student::FirstName; Student::MiddleName; Student::NickName"; "The Student With No Name" ) will return "Joe" since it's first on the list

given the field values:
Student::FirstName = (empty)
Student::MiddleName = (empty)
Student::NickName = (empty)

ShowValueCascade ( "Student::FirstName; Student::MiddleName; Student::NickName"; "The Student With No Name" ) will return "The Student With No Name" all the referenced fields are empty

 

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: