Brian Dunning's FileMaker Custom Functions

ValueMath ( List1 ; List2 ; operation )

Do mathematical calculations on corresponding members of two value lists

  Average rating: 3.3 (4 votes) Log in to vote

Bill Thurmes   Bill Thurmes - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
ValueMath ( "8¶7¶6¶5" ; "6¶5¶20¶20¶20¶20¶14¶0¶5¶10¶10" ; "*" )
ValueMath ( "8¶7¶6¶5" ; "6¶5¶0¶20" ; "/" )
ValueMath ( "8¶7¶6¶5" ; 2 ; "^" )
ValueMath ( "8¶7¶6¶5" ; "" ; "^" )
  Sample output:
1.333...¶1.4¶?¶.25 --note: divide by 0 gives ?
Result: 64¶49¶36¶25 --note: acts like Extend
Result: "" --an empty value list results in an empty result

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

Use two value lists and multiply/divide/add/subtract/(raise to power) them together, value position by value position
The result is a new value list with the results of each math manipulation
Note: If one List is only one member long, this function will work like Extend, i.e., apply that value with operation to all members of other list
Note: If both lists are >= 2 members long but are not the same length, concatenate the longer list

I later (Feb 2019) renamed this ValueArithmetic because it was a better description of what the CF does



Log in to post comments.


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

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 16 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: