User manual

Table Of Contents
11-10
FileMaker Pro User’s Guide
Trigonometric functions
Logical functions
Use logical functions to return a different result depending on the
value in a field or fields.
Example with two possible results:
If(Percent > 50,“Acceptable”,”Not Acceptable”)
Example with more than two possible results:
Case (Percent >90, “Excellent”, Percent > 70,
“Adequate”, “Poor”)
Status functions
Use status functions in ScriptMaker scripts to monitor the state of
your database. For information about scripting, see chapter 10,
“Creating scripts to automate tasks.” For an example script using
status functions, choose Help menu > Contents and Index, click the
Index tab, and type status functions.
Syntax Definition
Atan (number) Returns the trigonometric arc (inverse) tangent of
number. The arc tangent is the angle, in radians,
whose tangent equals number.
Cos (number) Returns the cosine of the angle (in radians) of
number.
Degrees (number) Converts number from radians to degrees
(π/180 radians).
Ln (number) Returns the base-e (natural) logarithm of number.
Log (number) Returns the common logarithm (base 10) of number,
which is any positive value.
PI Returns the value of pi (π), approximately 3.14159.
Radians (number) Converts degrees (π/180 radians) in number to
radians. Parameters for trigonometric functions
must be in radians—use this function to convert
values from degrees to radians within a formula.
Sin (number) Returns the sine of an angle expressed in radians.
Tan (number) Returns the tangent of the angle (in radians) in
number. Tangents for values of 90 degrees (π/2
radians) or multiples are undefined (infinite).
Syntax Definition
Case (test1, result1 [, test2,
result2, default result]...)
Evaluates test(s) to produce a result. When test1 is
true (a nonzero value), returns result1; when test1
is false, evaluates test2. When test2 is true, returns
result 2, and so on. When no test is true, returns an
empty (null) value, or the default result you
supply.
Choose (test, result0 [,
result1, result2]...)
Evaluates test to produce an index number used to
choose a result. When index is 0, returns result0;
when index is 1, returns result1, and so on. When
there’s no corresponding result, returns an empty
(null) result.
If (test, result one, result
two)
Evaluates test to return a true or false result. When
test is true (a nonzero value), returns result one;
when test is false (0), returns result two. Test must
return either a numeric or Boolean result. If you
have more than two possible results, consider
using the Case function.
IsEmpty (field) Returns true (1) when field is empty (null);
otherwise returns false (0).
IsValid (field) Returns false (0) when field is missing from the
file or when field contains an invalid value;
otherwise returns true (1). For example, if a field
in a related file is deleted, references to that field
in the master file are invalid.