Brian Dunning's FileMaker Custom Functions

AbbreviateTextCustom ( text ; spaces ; hyphens ; periods )

Returns acronyms or initials.

  Average rating: 4.7 (24 votes) Log in to vote

Fran├žois Goulet   Fran├žois Goulet

Share on Facebook Share on Twitter

  Sample input:
Ex 1: AbbreviateTextCustom ( "Jean-Paul Sartre" ; 0 ; 1 ; 1 )
Ex 2: AbbreviateTextCustom ( "Jean-Paul Sartre" ; 1 ; 1 ; 2 )
Ex 3: AbbreviateTextCustom ( "as soon as possible"; 0 ; 0 ; 0 )
  Sample output:
Ex.1: J-PS.
Ex.2: J.-P. S.
Ex.3: ASAP

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

NOTE: THIS CUSTOM FUNCTION REQUIRES THE "AbbreviateText" cf.


This custom is similar to the "AbbreviateText" cf. (to which it refers) but will allow the suppression of spaces and/or hyphens and/or periods which might otherwise be present when using the "AbbreviateText" cf. alone.

Parameters: set "Spaces" to "0" to remove all spaces otherwise set to "1"; set "Hyphens" to "0" to remove all hyphens otherwise set to "1"; set "Periods" to "0" to remove all periods, set it to "1" to keep only a trailing period, otherwise set it to "2".

Examples:

AbbreviateTextCustom ( "Mary Jane" ; 1 ; 1 ; 0 ) would produce: M J
AbbreviateTextCustom ( "Mary Jane" ; 0 ; 0; 0 ) would produce: MJ
AbbreviateTextCustom ( "Mary Jane" ; 0 ; 0; 1 ) would produce: MJ.
AbbreviateTextCustom ( "Mary Jane" ; 0 ; 0; 2 ) would produce: M.J.
AbbreviateTextCustom ( "Mary Jane" ; 1 ; 0; 1 ) would produce: M J.
AbbreviateTextCustom ( "Mary Jane" ; 1 ; 0; 2 ) would produce: M. J.

AbbreviateTextCustom ( "Jean-Paul Sartre" ; 1 ; 1 ; 0 ) would produce: J-P S
AbbreviateTextCustom ( "Jean-Paul Sartre" ; 1 ; 1 ; 1 ) would produce: J-P S.
AbbreviateTextCustom ( "Jean-Paul Sartre" ; 1 ; 1 ; 2 ) would produce: J.-P. S.
AbbreviateTextCustom ( "Jean-Paul Sartre" ; 0 ; 1 ; 1 ) would produce: J-PS.
AbbreviateTextCustom ( "Jean-Paul Sartre" ; 1; 0 ; 1 ) would produce: JP S.
AbbreviateTextCustom ( "Jean-Paul Sartre" ; 0; 0 ; 2 ) would produce: J.P.S.

etc.

 

Comments

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 15 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:

Under construction. Email me your wish list for improvements.