Brian Dunning's FileMaker Custom Functions

LeftSeparator ( text ; seperator ; occurrence )

Returns the characters in text counting from the left to the specified occurrence of the separator.

  Average rating: 3.9 (34 votes) Log in to vote

Kurt Otto   Kurt Otto
ottopiaDESIGN
http://ottopia.dyndns.org/

Share on Facebook Share on Twitter

  Sample input:
LeftSeparator ( "aaa:bbb:ccc" ; ":" ; 1 )
  Sample output:
aaa

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

Format
------
LeftSeparator ( text ; seperator ; occurrence )

Parameters
----------
text - any text expression or text field.
separator - any text expression or text field representing the set of characters you want to find.
occurrence - any numeric expression or field containing a number, representing which instance of the text string you want to find.

Data type returned
----------------
text

Description
----------
Returns the characters in text counting from the left to the specified occurrence of the separator.

Examples
--------
LeftSeparator ( "aaa:bbb:ccc" ; ":" ; 1 ) returns aaa
LeftSeparator ( "aaa:bbb:ccc" ; ":" ; 2 ) returns aaa:bbb
LeftSeparator ( "aaa:bbb:ccc" ; ":" ; 3 ) returns ""

 

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.