Brian Dunning's FileMaker Custom Functions

Acronym ( text )

Returns the first letter of each word in phrase (in upper case).

  Average rating: 4.1 (54 votes) Log in to vote

Ray Cologon   Ray Cologon - Show more from this author
NightWing Enterprises
http://www.nightwing.com.au/FileMaker

Share on Facebook Share on Twitter

  Sample input:
Acronym("Your mileage may vary")
  Sample output:
YMMV

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

Here is another recursive function which is designed to extract the initial letter of each word in the supplied text.

It may have a number of practical applications, including returning the initals from a name field or the acronym from a company name.

... or maybe you'd like to use it as the 'core technology' for a FileMaker guessing game that will keep your kids entertained some rainy day. :)

 

Comments

Dan Stein   Dan Stein, Bala Cynwyd
Nov 15, 2016
This is a bit shorter as a case statement

Case ( WordCount ( text ) > 0 ;

Upper ( Left ( text ; 1 ) ) & Acronym_CFpub ( RightWords ( text ; WordCount ( text ) - 1 ) ) ;

)
 
Ray Cologon   Ray Cologon, Melbourne
Nov 15, 2016
Hi Dan,

The change you're suggesting doesn't depend on the use of the Case( ) function. If you want to use they type of syntax you're envisioning, you'd be better off to go with:

If(WordCount(text);
Upper(Left(text; 1)) & Acronym(RightWords(text; WordCount(text) - 1));
)

Regards,
Ray
 
Philip Rand   Philip Rand, Italy
Jul 8, 2018
Just to say I'm struggling with your function, but am grateful for the experience.
I still have to learn about Custom Functions.
 

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: