Evaluate()

 <  Day Day Up  >  

Evaluate()

Category: Logical

Syntax: Evaluate ( expression { ; [ field1 ; field2 ; ...] } )

Parameters: expression ”any valid calculation formula, field containing a valid formula, or expression returning a valid formula; field(n) ”a list of fields upon which the expression is dependent; the expression re- evaluates when any of the fields are updated.

Parameters in curly braces {} are optional. The optional field list must be enclosed by square brackets when there are multiple parameters.

Description: The Evaluate() function returns the results obtained by evaluating expression .

The optional second parameter is a list of fields on which the calculation is dependent. When any of those fields are modified, the Evaluate() function re-evaluates the expression specified by the first parameter.

Examples:

 

 Evaluate(MyFormula) 

Returns 8 , if MyFormula contains the string 5+3 .

 

 Evaluate(MyFormula) 

Returns 4 , if MyFormula contains the string Length (FirstName) and FirstName contains Fred .

 

 Evaluate("MyFormula") 

Returns 5+3 , if MyFormula contains the string 5+3 .

 

 Evaluate(Quote ("The comment field was last updated on " & Get (CurrentDate) & " by " & graphics/ccc.gif Get (AccountName)) ; CommentField) 

Returns a string containing information about the date and user who last modified the CommentField .

Comments:

Uses of the Evaluate() function are covered in depth in Chapter 14, "Specialized Calculation Functions."

The Evaluate() function expects that the first parameter passed to it is a string that contains a formula of some sort . If you are passing a literal string, as in the fourth of the preceding examples, using the Quote() function ensures that any quotation marks in the formula itself are properly encoded. If the first parameter is a field name or an expression, that field or expression is expected to return a formula, which the Evaluate() function then evaluates. In a nutshell , if the first parameter is not surrounded by quotation marks, the result of whatever field or expression is provided is evaluated.

 <  Day Day Up  >  


QUE CORPORATION - Using Filemaker pro X
QUE CORPORATION - Using Filemaker pro X
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 494

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net