Regular statement or script control statements
A Regular statement or script control statements:
QlikView scripts consist of a number of statements and expressions. 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.
All script keywords can be typed with any combination of lower case and upper case characters.
Regular script statements include:
Regular script statements are used for data handling and manipulation, and are the most common forms of script statements. These statements can be written in multiple rows of the script, but must always be terminated with a semicolon (;).
- Map, Unmap
Script control statements include:
Control statements are optional statements typically used for controlling the logical flow of the script execution, such as in loops. Each clause of a control statement must be kept inside one script line and may be terminated by a semicolon.
- if… then… else if… else… end if
- For… next
- For each… next
- Do… loop
- Switch… case… default… end switch
- Exit script
- Sub… end sub
One general rule about statements is that prefixes may be applied to some regular statements but not to control statements. The exception to this rule is that the ‘When’ and ‘Unless’ prefixes can be used as suffixes to a few control statement clauses.
Script clause keywords can use any combination of lowercase and uppercase characters, but remember that field and variable names used in the script statements are case sensitive.
Script control statements control the logical flow of the script. They are optional features and can assist when using loops and if… then (conditional) statements.
Enroll for Instructor Led Live Qlikview Training