Brian Dunning's FileMaker Custom Functions

SeparateStringtypes ( text ; separator )

inserts Separator between numeric and other characters.

  Average rating: 4.3 (33 votes) Log in to vote

Maarten Witberg   Maarten Witberg - Show more from this author
http://www.maatwerkdbs.nl

Share on Facebook Share on Twitter

  Sample input:
SeparateStringtypes ( "ABC123Z" ; "-" )
  Sample output:
ABC-123-Z

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

This function was written to format user-defined product serials that consist of alphanumeric strings. Original question posed here: http://www.filemakertoday.com/com/showthread.php/29875-Separate-text-and-number

The function is recursive. From the rightmost character it compares two adjacent characters and inserts separator where they don't match. Then recurses to the next character by entering the input text minus 1 character.
Please note that any non-numerical character is treated as text, so $&#% are bracketed in with alpha characters.

 

Comments

jose   jose, Los Angeles, California
Sep 5, 2013
How I can convert a field containing numeric and alpha to text.
Example:
Z45 = Z four five
ML7899+ ML seven eight nine nine
642103 = six zero three two one four
7552.32= seven five five two. trhee two

Thanks
j2133070852@yahoo.com
 
Maarten Witberg   Maarten Witberg
Sep 5, 2013
Hi Jose,

Well this function was not designed for that purpose. There are to the best of my knowledge various custom functions available here at Briandunning.com that can do what you want. For instance http://www.briandunning.com/cf/106 . That function is not by me and I have not tested it.

Good luck,

Maarten
 

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: