Help

Table Of Contents
FILEMAKER PRO HELP 845
Note The Salaries::Salary field is a number 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.
Define a calculation field in the Employees table, then use the ExecuteSQL function to specify the
following query statement:
100 * Salaries::Salary / ExecuteSQL ( “select sum ( S.salary ) from
Employees E join Salaries S on E.EmpID = S.EmpID where E.Department = ?”;
“”; “”; Employees::Department )
Related topics
Functions reference (category list)
Functions reference (alphabetical list)
About formulas
About functions
Defining calculation fields
Using operators in formulas
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
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