Parameters
Last updated 11/03/2026
Overview
Query parameters are defined on the Parameters page and referenced in the SQL editor using positional placeholders. Within the SQL statement, a
?
placeholder
is inserted wherever a parameter value should be applied. These placeholders indicate to the database where a value will be supplied when the query is executed.
Each
?
placeholder must correspond to a parameter record on the Parameters page. Because the database processes these placeholders positionally, the
parameter records must appear in the same order as the ?
placeholders in the SQL statement. The first parameter record in the list on the Parameters page
supplies the value for the first ?
, the second parameter record supplies the value for the second ?
, and so on. Maintaining this
order ensures that the correct values are applied to the correct parts of the query at runtime.
Expression
The value supplied by a parameter is defined in the Parameter field on the parameter record. If the value should come from an expression, it is wrapped in double curly braces
{{ }}
. These expressions use Five's API to reference values available in the application context. For example:
{{five.stack.Department.DepartmentKey}}
This expression retrieves the
DepartmentKey
value from the current stack context and passes it into the query when it runs.
tip
Refer to the documentation on Five's properties on the Five object.

Figure 1 - Expresssion example
Example syntax
SELECT
Employee.FirstName,
Employee.LastName,
Employee.Extension
FROM
Employee
INNER JOIN EmployeeDepartment ON Employee.EmployeeKey = EmployeeDepartment.EmployeeKey
WHERE EmployeeDepartment.DepartmentKey = ?
Constant
If the parameter represents a constant value instead, the value can be written directly in the Parameter field without using
{{ }}
.

Figure 2 - Constant example