Brian Dunning's FileMaker Custom Functions

nthField ( field ; delimiter ; occurrence )

Get the nth field from a string with a given delimiter.

  Average rating: 4.2 (30 votes) Log in to vote

Pascal Jacob   Pascal Jacob - Show more from this author
Globis nv
http://www.globis.be

Share on Facebook Share on Twitter

  Sample input:
nthField ( "First|Second|Third" ; "|" ; 2 )
  Sample output:
Second

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

Get the nth field from a string with a given delimiter.

 

Comments

Todd   Todd, TN
Aug 1, 2014
Doesn't work if no delimiter in field and occurrence is 1, returns a blank string. Ex nthField ( "A" ; "|" ; 1 ) returns "".
 

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: