bBox_EvaluateList

bBox_EvaluateList( values; expression {; delimiter} )
Parameters:
   values: delimited list of string values
   expression: an expression in same form as FileMaker's native Evaluate function
   delimiter: string to use as a delimiter, defaulting to a return character

Result:
   text result

Error:
   none

Script Step:
   none

––––––––––

First appeared in: 0.70

Examples in demo file: 3

Compatibility:   Client, macOS, Server, Ubuntu, WebDirect, WPE

––––––––––

For each value supplied, apply the given expression and append it to the function's result. This is similar to how a list comprehension works in Python, and a way of doing looping in a FileMaker calculation.

There are two variables that will be preset when the expression is evaluated. $i will be set to the current iteration number, starting at 1, and incrementing for every value. $v will be set to the current value in list (similar to the statement $values [$i], where $values is an array of strings). For this to work there is some special handling of quote characters, but this will be invisible to your expression.

There is a special case for the delimiter value. If you pass a null string (i.e., "") as the delimiter, each character in the values parameter will be treated as a separate value. This expression would strip all upper-case characters from the values parameter:

bBox_EvaluateList (
   "some Characters to Test with";
   "If (Code ($v) < Code (\"A\") or Code ($v) > Code (\"Z\"); $v; \"\")";
   ""
)

––––––––––

bBox Functions

bBox Wiki