Brian Dunning's FileMaker Custom Functions

mapexpr ( expr ; l )

apply an expression to every value in a value list

  Average rating: 4.5 (31 votes) Log in to vote

steve harley   steve harley
paper ape

Share on Facebook Share on Twitter

  Sample input:
mapexpr (
"left (_v; 3)";
list ("abc"; "wxyz"; "ferdinand")
  Sample output:

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

to perform the same operation on every value in a value list (l), supply an expression (expr) for the operation using "_v" for the value; this custom function will traverses the value list and for each value assigns Let() variable _v to the current value, then uses Evaluate() to apply the expression to the value; the result is a value list with each original value transformed by the expression

• since mapexpr uses GetValue(), the expression should *not* expect values to be return-terminated
• while value lists are by definition text strings, if the text values are numeric, expr can usually use mathematical operations on each value in the list
• Evaluate() will transform any returns in expr to spaces



Log in to post comments.


Note: these functions are not guaranteed or supported by Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.