ShowValue ( text ; altText ) ( )

Function stats

Average user rating
234
248
9999
Support
FileMaker 7.0 +
Date posted
19 February 2010
Version
1
Recursive function
No

Author Info
 Chad S.

3 functions

Average Rating None

author_avatar



 

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

*/
// ===================================

 

 

 

 


Login or register to comment

Create a new account with fmcustomfunctions.com or login to post a comment.

 

 

 

Top Tags

Text Parsing  (24)
List  (19)
XML  (15)
Format  (14)
Date  (14)
Debug  (12)
Layout  (11)
Variables  (10)
Filter  (9)
ValueIterator  (6)
Layout Objects  (6)
Number  (5)
Recursive  (5)
Dev  (5)
Interface  (5)
Text  (5)