Skip to content

Instantly share code, notes, and snippets.

@dansmith65
Last active December 29, 2015 03:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dansmith65/7609709 to your computer and use it in GitHub Desktop.
Save dansmith65/7609709 to your computer and use it in GitHub Desktop.
In FileMaker, return value in specified location of delimited text.
/**
* =====================================
* GetDelimitedValue ( text ; delimiter ; occurrence )
*
* RETURNS:
* Value in specified location of delimited text.
*
* PARAMETERS:
* text = (text) delimited data
* delimiter = (text) single character used to separate values
* occurrence = (number) instance to return
*
* DEPENDENCIES:
* none
*
* HISTORY:
* CREATED on 2013-NOV-13 by Daniel Smith dansmith65@gmail.com
* =====================================
*/
Let ( [
text = text & delimiter ;
~start = Position ( text ; delimiter ; 1 ; occurrence - 1 ) + 1 ;
~end = Position ( text ; delimiter ; 1 ; occurrence )
] ;
Middle ( text ; ~start ; ~end - ~start )
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment