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 - Show more from this author
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 ) ) )
 
André   André
Aug 15, 2020
Hi! Is there a Function that can create a Drop Cap as done in the first character in a novel? There, the first character is bold and at large size, and it has the height of the first to text lines.

Creating a larger first character isn't that difficult in Filemaker, but how can I give it the height of the first 2 text lines (all in a text field)?

Best wishes,
André
 
Tim Cimbura   Tim Cimbura, LuminFire
Aug 15, 2020
I think you can't do this because a FileMaker text field doesn't allow variable line heights. It is not a page layout tool.
 
André   André
Aug 15, 2020
Yes, I was afraid it would be impossible. Would be a nice addition for the solution I’m working on. Thanks!
 
André   André
Aug 15, 2020
Hi! Is there a Function that can create a Drop Cap as done in the first character in a novel? There, the first character is bold and at large size, and it has the height of the first to text lines.

Creating a larger first character isn't that difficult in Filemaker, but how can I give it the height of the first 2 text lines (all in a text field)?

Best wishes,
André
 
André   André
Aug 15, 2020
What about something like this?
Increasing the first character text size; turning the character into an image; positioning it at the top left corner of the text field and wrapping the text lines around it?
 
André   André
Aug 15, 2020
What about something like this?
Increasing the first character text size; turning the character into an image; positioning it at the top left corner of the text field and wrapping the text lines around it?
 
André   André
Aug 15, 2020
What about something like this?
Increasing the first character text size; turning the character into an image; positioning it at the top left corner of the text field and wrapping the text lines around it?
 
Tim Cimbura   Tim Cimbura, LuminFire
Aug 15, 2020
Good idea. Can’t be done with a custom function...or within filemaker native. Could likely do this with a web viewer.
 

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: