AnsweredAssumed Answered

Best practice to Evaluate ( $myFormula )

Question asked by filemaker@i-absolute.com on May 3, 2016
Latest reply on May 5, 2016 by filemaker@i-absolute.com

Hi all,

I need to evaluate a formula inserted in a field.

 

Via script I get the field's content (the formula) and I save it in a variable, I substitute the keys (x, y) with current values and I would like to get the calculated result.

 

I.e. In my field I have the formula: x ≥ ( 6 * y ) and x ≤ ( 8 * y ):

 

where x = 5 and y = 10 the result return,

5 ≥ ( 6 * 10 ) and 5 < ( 8 * 10 ) ===> False

where x = 75 and y = 10 the result return,

75 ≥ ( 6 * 10 ) and 5 < ( 8 * 10 ) ===> True

 

How I can do this in a simple way?

 

Fabio

Outcomes