Functions Reference

Table Of Contents
FILEMAKER FUNCTIONS REFERENCE 169
Examples
Suppose a database contains two tables, Employees and Salaries, which are related through the
EmpID field.
You want to add a field to the Employees table that displays the percentage of an employee’s salary
relative to the total salaries in a department. Though you could use a calculation in FileMaker
Pro to
generate this value, you can use the ExecuteSQL function to specify this query using dynamic
parameters, which prevents confidential salary information from unauthorized access.
Define a calculation field in the Employees table, then use the ExecuteSQL function to specify the
following query statement:
100 * Salary::Salary / ExecuteSQL("select sum(S.salary) from Employees E
join Salary S on E.EmpID = S.EmpID where E.Department = ?"; ""; "";
Department)
Related topics
Contents
Functions reference (alphabetical list)
GetAsBoolean
Purpose
Returns 1 if data converts to a non-zero numeric value or if a container field contains data; returns
0 if
data has a numeric value of 0 or is empty.
Format
GetAsBoolean(data)
Parameters
data - any text, number, date, time, timestamp or container expression, or a field containing text, a
number, date, time, timestamp or container
Data type returned
number
Originated in
FileMaker Pro 8.0
EmpID
Last Name
Department
1
2
3
4
5
6
Smith
Ogawa
Durand
Garcia
Mehmet
Ferrini
Development
Development
Quality Assurance
Quality Assurance
Documentation
Marketing
EmpID
Salary
1
2
3
4
5
6
98000
87000
86000
90000
89000
121000
Employees Salaries