Brian Dunning's FileMaker Custom Functions

CapitalizeFirstCharacter ( text )

This function removes spaces at the beginning of the text in question and then capitalizes the first character.

  Average rating: 4.6 (19 votes) Log in to vote

Tim Cimbura   Tim Cimbura
LuminFire
http://luminfire.com

Share on Facebook Share on Twitter

  Sample input:
CapitalizeFirstCharacter(" this is a demo")
  Sample output:
"This is a demo"

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

This function removes spaces at the beginning of the text in question and then capitalizes the first character.

 

Comments

Bruce   Bruce, Redmond WA
Mar 6, 2016
Your use of trim is inconsistent and so the expression doesn't work if there is a leading trimmable character.

Should be:
Replace ( Trim ( text ) ; 1 ; 1 ; Upper ( Left ( trim(text) ; 1 ) ) )
 

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.

Under construction. Email me your wish list for improvements.