AbbreviateTextCustom ( text ; spaces ; hyphens ; periods )
Returns acronyms or initials.
Average rating: 4.7 (24 votes) Log in to vote
François Goulet |
Ex 2: AbbreviateTextCustom ( "Jean-Paul Sartre" ; 1 ; 1 ; 2 )
Ex 3: AbbreviateTextCustom ( "as soon as possible"; 0 ; 0 ; 0 )
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
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.