Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products. All content is subject to change and is provided without warranty.
The Qlik Sense script consists of a number of statements. A statement
can be either a regular script statement
or a script control statement.
Control statements are typically used for controlling the flow of the
script execution. Each clause of a control statement must be kept inside
one script line and may be terminated by semicolon or end-of-line.
Prefixes are never applied to control statements, with the exceptions
of the prefixes when and unless which may be used with a few
specific control statements.
All script keywords can be typed with any combination of lower case
and upper case characters.
Use the drop-down on each function to see a brief description and the syntax of each function. Click the function name in the syntax description for further details.
The call control statement calls
a subroutine which must be defined by a previous sub
statement.
The for each..next control statement is a script iteration construct which executes one or several statements for each value in a comma separated list.
The statements inside the loop enclosed by for
and next will be executed for
each value of the list.
The for..next control statement
is a script iteration construct with a counter. The statements inside the loop enclosed
by for and next
will be executed for each value of the counter variable between specified
low and high limits.
The if..then control statement is a script selection construct forcing the script execution to follow different paths depending on one or several logical conditions.
Information noteSince the if..then statement
is a control statement and as such is ended with either a semicolon or
end-of-line, each of its four possible clauses (if..then,
elseif..then, else
and end if) must not cross a line
boundary.
The switch control statement is a script selection construct forcing the script execution to follow different paths,
depending on the value of an expression.