Brian Dunning's FileMaker Custom Functions

TrimAt ( text ; delimiter ; occurrence )

returns all text preceding the specified occurrence of the specified delimiter

  Average rating: 5.0 (1 vote) Log in to vote

Jeff Drake   Jeff Drake - Show more from this author
Drakeling Technologies

Share on Facebook Share on Twitter

  Sample input:
TrimAt ( "Mississippi" ; "i" ; 3 )
  Sample output:
Mississ

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

This function acts like Left, but uses the Position of the specified delimiter as a point of reference. If the occurrence parameter is:

• a positive integer, the value returned will be all characters preceding that occurrence of the delimiter, moving forwards from the first character of the original text.

• a negative integer, the value returned will be all characters preceding that occurrence of the delimiter, moving backwards from the last character of the original text.

• Any other value returns an empty string.

 

Comments

Razor   Razor
Jan 21, 2019
Perfect. Does exactly what I needed it to do. Thanks!
 

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: