Skip to main content

When

The when prefix and suffix is used for creating a conditional clause which determines whether a statement or exit clause should be executed or not. It may be seen as a compact alternative to the full if..end if statement.

Syntax:  

(when condition statement | exitstatement when condition )

 

The statement or the exitstatement will only be executed if condition is evaluated to True.

The when prefix may be used on statements which already have one or several other statements, including additional when or unless prefixes.

Syntax:  

When arguments
Argument Description
condition A logical expression evaluating to True or False.
statement Any QlikView script statement except control statements.
exitstatement An exit for, exit do or exit sub clause or an exit script statement.

Examples:  

exit script when A=1;

when A=1 LOAD * from myfile.csv;

when A=1 unless B=2 drop table Tab1;

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com