Function overview
Prototype
ShowValue ( text ; altText ) (
text; altText )
Parameters
text the text you want to display
altText an alternate text to show if the primary text is empty
Description
Tags:
Text Parsing
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"
Examples
Sample input
ShowValue ( Student::LastName ; "No Last Name" )
Sample output
No Last Name
Function code
/*
NAME: ShowValue ( text; altText )
CREATORNAME: Chad Sager, IT Solutions Consulting, Inc.
CREATOREMAIL: chad.sager@itsolutions-inc.com
DATE CREATED: 2010-02-18
DATE LASTMODIFIED: 2010-02-18
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
*/
Case (
not IsEmpty ( text ) ; text;
altText
)
// ===================================
/*
This function is published on FileMaker Custom Functions
to check for updates and provide feedback and bug reports
please visit http://www.fmfunctions.com/fid/248
Prototype: ShowValue ( text ; altText )( text; altText )
Function Author: Chad S. (http://www.fmfunctions.com/mid/234)
Last updated: 19 February 2010
Version: 1
*/
// ===================================
/*__LITBR____LITBR__NAME: ShowValue ( text; altText )__LITBR__CREATORNAME: Chad Sager, IT Solutions Consulting, Inc.__LITBR__CREATOREMAIL: chad.sager@itsolutions-inc.com__LITBR__DATE CREATED: 2010-02-18__LITBR__DATE LASTMODIFIED: 2010-02-18__LITBR____LITBR__PURPOSE: to show a value if it exists and if not, use an alternate. __LITBR____LITBR__PARAMETERS: __LITBR__text - the text you want to display__LITBR__altText - an alternate text to show if the primary text is empty__LITBR____LITBR__IMPORTANT NOTES: remember if you want any or all the parameters to be empty, just use "" (double quotes)__LITBR____LITBR____LITBR__EXAMPLES:__LITBR____LITBR__ShowValue ( Student::LastName; "No Last Name" )__LITBR____LITBR__Will return an "No Last Name" When last name is Empty__LITBR____LITBR____LITBR__*/__LITBR____LITBR____LITBR____LITBR____LITBR__Case ( __LITBR__ not IsEmpty ( text ) ; text; __LITBR__ altText __LITBR__)__LITBR____LITBR__// ===================================__LITBR__/*__LITBR____LITBR__ This function is published on FileMaker Custom Functions__LITBR__ to check for updates and provide feedback and bug reports__LITBR__ please visit http://www.fmfunctions.com/fid/248__LITBR____LITBR__ Prototype: ShowValue ( text ; altText )( text; altText )__LITBR__ Function Author: Chad S. (http://www.fmfunctions.com/mid/234)__LITBR__ Last updated: 19 February 2010__LITBR__ Version: 1__LITBR____LITBR__*/__LITBR__// ===================================
Login or register to comment
Create a new account with fmcustomfunctions.com or login to post a comment.