@param
The @
character is used when declaring and using a variable.
The following example sets a variable to "Example".
Example
set @textvar = 'Example'
The following IQL is an example from the Form designer. The code is written as behavior for a label. The code sets the caption of the label to "Example".
Example
let @textvar = 'Example'
set :caption = @textvar
Call
The call
statement is used to execute a routine.
The statement can be used in:
Forms |
Rules |
||
---|---|---|---|
Behavior |
Run on: click, change, init and select |
Filters & iql-charts |
|
x |
✓ |
x |
✓ |
The following IQL is an example from the Form designer. The code is written as a Run on click routine for a button that has a detail as parent. The code saves the datasource of the detail when the button is clicked.
Example
call save()
Where
The where
clause is used to filter records.
This clause is only used in configuration of Charts and Rules. |
Syntax
Field name from Table name
where Condition
The function can be used in:
Forms |
Rules |
||
---|---|---|---|
Behavior |
Run on: click, change, init and select |
Filters & iql-charts |
|
x |
✓ |
x |
x |
The following IQL is an example from the Form designer. The code is written in a IQL chart, and it makes the IQL chart display the values of the fields Full name and Salary from all records in the Employee table, where the Full name value contains an "a".
Example
"Full name", Salary from Employee
where "Full name" contains 'a'
Group by
The group by
clause is exclusive for configuration of Charts and is used to arrange identical data into groups. It must be used in combination with aggregation functions (count, sum, etc.).
Syntax
Field name 1 ,Aggregation function(Field name 2) from Table name
group by Field name 1
The following IQL is an example from the Form designer. The code is written in a IQL chart, and it makes the IQL chart display how many employees every department has from a table named Employee. The chart is grouped by Department.
Example
Department, count(Recordname) from Employee
group by Department
Order by
The order by
clause is exclusive for configuration of Charts and is used to sort data by one column in ascending order by default. Add the keyword desc
after to sort in descending order.
Syntax
Field name 1, Field name 2 from Table name
order by Field name
The following IQL is an example from the Form designer. The code is written in a IQL chart, and it makes the IQL chart display how many employees every department has from a table named Employee. The chart is both grouped and sorted by Department.
Example
Department, count(Recordname) from Employee
group by Department
order by Department