Brian Dunning's FileMaker Custom Functions

CaseStatus ( theText )

Determines if text is all upper case, all lower case, or mixed case (ignoring non a-Z chars)

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

Michael Pease   Michael Pease
KPM
http://www.whitehouse.org/

Share on Facebook Share on Twitter

  Sample input:
CaseStatus ( "123 e. 4th" )
  Sample output:
L

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

Useful for checking entry data such as names and addresses. Effectively ignores numbers and punctuation.

 

Comments

Will Loving   Will Loving, Dedication Technologies, Inc.
Aug 23, 2010
The function needs an additional Case condition to check that the field itself is not empty, otherwise it returns a "U" for empty fields.
 
Tim Cimbura   Tim Cimbura, LuminFire
Oct 29, 2011
Very useful. Here's an updated version with more options.

/* Determines the status of a text string as Empty, Upper, Numbers Only, Lower, or Mixed case.
May return "Upper" if no a-Z characters are found.
Used the fact that the Substitute function is case sensitive */

Case (
theText=""; "Empty";
Filter ( theText; "0123456789") <> "" and Filter ( theText; "+-*/_.,()") <> ""; "Numbers Only"; // Phone number or calc
Substitute ( theText ; Upper ( theText ) ; "" ) = "" ; "Upper" ;
Substitute ( theText ; Lower ( theText ) ; "" ) = "" ; "Lower" ;
"Mixed" // for "mixed case"
)
 

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