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 IT Solutions Consulting, Inc. http://www.itsolutions-inc.com/Filemaker |
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
belg4mit Mar 17, 2023 |
||
https://www.briandunning.com/cf/2174 offers a non-recursive option that does not use indirection, although it perhaps a bit more verbose ||( ||( ||(Student::FirstName; Student::MiddleName); Student::NickName"); "The Student With No Name") |
||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.