Software Venture Consulting

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

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


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

Title ( Text ; LeaveEmpty )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.0  (55 votes)
  Discuss this Custom Function

Howard Schlossberg, FM Professional Solutions, Inc.
http://fmprosolutions.com

This is similar to FileMaker's built-in Proper() function, but much more practical for the real world. It was created with the proper formatting of song titles in mind, but can also be applied to book or movie titles, headlines and more.

Sample Input:
Title ( "back in the ussr (the beatles)" ; "" )
Sample Output:
"Back in the USSR (The Beatles)"


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

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

This was inspired by the SmarterProper() function (posted on this site by David Tremmel), but whereas that function was more befitting of people's names, I needed something that would also take into consideration that not all words in a song title or headline should be capitalized (ie: a, an, the, and, in, or, etc). And then I realized that some words should always be all upper-case (CD, USA, UK, and certain band names like REM or INXS, etc). So I rewrote David's function from the ground up to accommodate my needs.

This function allows you to easily add additional keywords that should always be lowercase or all-uppercase, depending on your particular needs and/or your users' bad habits.

The function also handles the proper formatting of some names that include some prefixes (ie: McDonald), though it is not properly suited for use with both names and titles (i.e. the prefix 'Mac', as in MacDonald, will also cause the synonym for computer to result in "MacHine"), so be careful here. And it capitalizes the letter after an apostrophe if there are more than just a couple letters after that apostrophe (to handle words like O'Malley without confusing it with Don't).

MORE EXAMPLES:
Title ( "old mcdonald had a farm"; "" ) returns "Old McDonald Had a Farm"
Title ( "o'shea"; "" ) returns "O'Shea"
Title ( "back in the ussr (the beatles)" ; "" ) returns "Back in the USSR (The Beatles)"
Title ( "the world. and more."; "" ) returns "The World. And More."
Title ( "m.i.a."; "" ) returns "M.I.A."
Title ( "19th nervous breakdown"; "" ) results in "19th Nervous Breakdown"
Title ( "more e-mail (don't we love it!)"; "" ) results in "More E-Mail (Don't We Love It!)"

Title ( "LaMond"; "" ) returns LaMond (rather than Lamond; it respects a capital letter that might have intentionally been entered if it comes after a lower-case letter )

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

This is my Custom Function and I want to edit it

Discuss:

Hi Howard,

thanks for sharing this great function!

It works great but I noticed a few exceptions that you may consider to add within the code.

This link might be of interest: http://aitech.ac.jp/~ckelly/midi/help/caps.html

Check out "Phrasal Verbs"... it would be cool to add an exception list section for specific words ("Call On", "Carry On", "Get By", "Turn On" for example).

Unfortunately I'm a newbie when it comes to CF/recursive calcs so I have no idea where to tweak it to make it work!

Just an idea, thanks again for this! Very cool!

Best,

Ricky

Ricky, Italy
June 01, 2012 6:38pm

Works really well - very useful. Thanks for sharing.

Dave Hobson, Bristol UK
August 07, 2013 7:37am

Thank you for sharing this function, it works great except in the following situation:

I pass an address to the function, if the address contains more than 7 numerals, then filemaker convert it into a number, e.g.

Flat 111A, 2/F, Kin Wang Mansion Stage 2, 111-112 Sai Yee Street, Mongkok, Kowloon.

The return is: 1.1122e+10

MW, Hong Kong
September 13, 2014 6:18am

** Problem solved **

Thank you for sharing this function, it works great except in the following situation:

I pass an address to the function, if the address contains more than 7 numerals, then filemaker convert it into a number, e.g.

Flat 111A, 2/F, Kin Wang Mansion Stage 2, 111-112 Sai Yee Street, Mongkok, Kowloon.

The return is: 1.1122e+10

Problem solved:
I use the function as a calculation field and forget to change the output type from number to text, so filemaker attempt to convert the text into a number.

MW, Hong Kong
September 13, 2014 9:06pm

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

Your Name:
City/Location:
Comment:
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 + 7 =
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. ProperAllWords ( text )
  (Thu, Dec 14, 5:19pm)
2. MatchExist ( SourceTable.Field ; DestTable.Field ; ReturnField )
  (Thu, Dec 14, 1:07pm)
3. BVR_Format ( bvr )
  (Wed, Dec 13, 5:32pm)
4. NumberToHexadecimal(NumberValue)
  (Fri, Dec 08, 8:54am)
5. Get_BaseTable
  (Thu, Dec 07, 4:27pm)
6. JSONCreateVarsFromKeys ( json ; namespace )
  (Wed, Dec 06, 8:21pm)
7. GetTableNzme ( field )
  (Tue, Dec 05, 9:16pm)
8. TimeFormatAsText ( theTime )
  (Mon, Nov 13, 1:59pm)

RSS Feed of Custom Functions