Database Reference
In-Depth Information
Unlike the other conditional functions, Choose() doesn't expect a Boolean expression for its
condition. Instead, it looks for a number . The number tells it which of the results to choose:
If the Condition is zero, then the function returns Result0 ; if it's one, then it returns Res-
ult1 ; and so on.
Imagine you have a Student table, and one of its fields is called GPA. This field holds the
student's current grade point average, as a number. You'd like to turn this number into a let-
ter grade on the printed report.
Many FileMaker developers would immediately jump to the Case() function to solve this
problem. They'd do something like this:
Case (
GPA < 0.5; "F";
GPA < 1.5; "D";
GPA < 2.5; "C";
GPA < 3.5; "B";
"A"
)
While this calculation gets the job done, you can do it more succinctly with the Choose()
function:
Choose ( Round(GPA; 0); "F"; "D"; "C"; "B"; "A" )
Search WWH ::




Custom Search