Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages

Shopping Cart
Shopping Cart


Free Newsletter


Privacy Policy

FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.


 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

SmarterProper ( inText; prevCase; textSoFar; prefixList; exceptions )

Rate this function:  

  Average rating: 2.5  (245 votes)
  Discuss this Custom Function

David Tremmel, Duke University

Similar to the Proper function, but handles names with prefixes better

Sample Input:
SmarterProper ( "MACDONALD"; 2; ""; "Mc¶Mac"; "ITT¶Macintosh" )
Sample Output:

 Then copy & paste into FileMaker Advanced's Edit Custom Function window.


** UPDATED on 7/11/16
Updated and corrected the examples, and fixed the bug noted by Rob

** UPDATED on 6/24/13
finally got around to fixing the bug noted by Lindee - apologies to all who had problems

** UPDATED on 4/30/12 to:
added a way to enter an exception list of words that would be left exactly as entered

** UPDATED on 6/15/09 to:
(1) really fix a bug affecting formatting around apostrophes
(2) fix a bug that gave incorrect results if there were multiple spaces between words

** UPDATED on 6/3/08 to:
(1) fix a bug affecting formatting around apostrophes
(2) add the ability to capitalize after hyphens
(3) add the ability to specify that the word start with a lowercase letter

SmarterProper is designed to handle names better than the standard Proper function. It returns text with the first letter of each word capitalized - like Proper does - but unlike Proper, it also:
(1) keeps any letters in the middle of words capitalized (if they were preceeded by a lowercase character in the original);
(2) capitalizes letters after an apostrophe (for names like O'Malley) - but only if the remaining text is longer than one character (to correctly format words like Didn't and It's);
(3) capitalizes the first letter of the second part of a hyphenated name;
(4) capitalizes letters after any prefixes you specify (e.g., Mc, Mac).

Syntax: SmarterProper( inText; prevCase; textSoFar; prefixList )
inText = the original text
prevCase = a number representing the case of the preceeding character (for recursion); it should be set to 2 to capitalized the first character of the text, or 0 if you want the first character of the text to be lowercase
textSoFar = the text string at this piont in the recursion; it should be set to empty when the function is called
prefixLIst = list of prefixes that should be followed by a capital letter (a return-delmiited list)


SmarterProper ( "MACDONALD"; 2; ""; "Mc¶Mac" ) returns MacDonald
SmarterProper ( "LaMond"; 2; ""; "Mc¶Mac" ) returns LaMond (rather than Lamond)
SmarterProper ( "o'shea"; 2; ""; "Mc¶Mac" ) returns O'Shea
SmarterProper ( "SMITH-THOMAS"; 2; ""; "Mc¶Mac" ) returns Smith-Thomas

Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it


5 most recent comments | Show all 14 comments

I can't even get this to add to the custom functions. It is telling me it's missing operators when I copied and pasted exactly from the above.

Annette, Ireland
November 04, 2013 4:06am

I've been trying to use LLC as an exception and it does not prevent it from improperly formatting it.

Ryan, NY
July 01, 2015 3:55am

succeeds with Mcwhirter-o'shea to translate as McWhirter-O'Shea
but fails with o'shea-mcwhirter - translates as O'Shea-Mcwhirter

Peter, Bristol
August 01, 2015 2:47am

This function is great. Thank you!

I took it one step further and added a global field for prefix and one for exceptions. I've added each exception or prefix followed by a carriage return. Then reference the field in the calculation instead of typing out all the prefix and exceptions into the calculation.

This makes it easier and quicker to add new prefix and exceptions as you come across them, also if you use the function in several scripts you don't have to update all of the scripts.

Rob, Atlanta
January 02, 2016 7:53am

I found an odd bug, it does correct the 's at the end of a word if there is another word after it.

SILLY SALLY'S returns--> Silly Sally's (which is perfect)
SALLY'S SILLY returns--> Sally'S Silly

Any thoughts? Other than this I love this function, thanks for your help.

Rob, Atlanta
May 08, 2016 12:33pm

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 5 + 9 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. HexUUIDToNum_cf (_uuid)
  (Sat, Jun 16, 1:55pm)
2. httpResponseCode ( responseHeaders )
  (Tue, Jun 12, 10:40pm)
3. FindDuplicateCharacters ( string )
  (Fri, Jun 08, 5:01pm)
4. FieldRepetitionLast ( field ; maxRepetition )
  (Wed, Jun 06, 6:05pm)
5. CountModifiedRecords ( NameTimestampField ; StartTimestamp ; EndTimestamp )
  (Mon, May 28, 8:23am)
6. JSONArrayLength ( JSONArrayStr )
  (Fri, May 25, 7:46am)
7. interpolation (y1; y2; y3; x1; x2; x3; x1y1; x2y1; x1y2; x2y2; rnd)
  (Sat, May 19, 3:55am)
8. @JSONFormatElements ( json )
  (Tue, May 15, 3:31am)

RSS Feed of Custom Functions