Unless

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

Syntax:  

(Unless condition statement | exitstatement Unless condition )

 

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

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

Arguments:  

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

Examples:  

exit script unless A=1;

unless A=1 LOAD * from myfile.csv;

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

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?