FileMaker Custom Functions
Expand FileMaker Pro with Custom Functions. Create a new custom function in FileMaker, enter the name and attributes of the corresponding bold header below, click the Select button below the text area, copy the highlighted text, and, paste it into the custom function calculation field. The code comments have usage instructions.*
GetValueIndex (valueList, valueString, matchCase, occurrence):
Retrieve the index of the matching valueString in the valueList. Returns 0 if not found. Optionally, toggle case-sensitive searching by passing a boolean through matchCase, and, search for a specific
valueString occurrence (a negative occurrence number causes backward search from the end of the valueList).
Examples:
ValueListIndex (“Alpha¶Bravo¶Charlie¶Echo”, “charlie”, False, 1) = 3
ValueListIndex (“Alpha¶Bravo¶Charlie¶Echo”, “charlie”, True, 1) = 0
ValueListIndex (“Danial¶Daniel¶Bill¶daniel¶Frank¶daniel¶Ed”, “Daniel”, True, -1) = 2