Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.