# Operate ( Expression )

Evaluates expressions with sums, substractions, multiplications and divisions

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

Ibrahim Bittar Torres Eikonsys, S.A. de C.V. http://www.eikonsys.com |

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

This simple function performs the 4 basic operations so you can use it as an autoenter calculation in a number field to enter not just numbers but operations between them. For example, if you want to input an initial balance in a number field you can input the actual number or the difference between Income and Outcome.

To avoid security issues with the evaluate function, it filters all values and keep only the numbers and the basic operators (+-*/).

Enjoy!!!.

## Comments

Tim Cimbura, LuminFire Oct 23, 2011 |
||

This function may fail if you enter numbers with commas like $1,230+50.55. I changed the filter to remove commas and allow a few other math expressions. Let (Final = Filter ( Expression ; "().+-*/^0123456789" ) ; Evaluate ( Final ) ) This may then affect the ability to work in different countries. |
||

Ibrahim Bittar, Leon, Mexico Oct 23, 2011 |
||

Hi Tim, thank you very much. Ibrahim |
||

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