Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to terminate the execution of a script?

How to terminate the execution of a script using a condition?

Edit:

LOAD Date(Date#([dtmAddedOn],'YYYY-MM-DD'),'DD/MM/YYYY') as dtmAddedOn,
Num(dtmAddedOn) as ndtmAddedOn,
Num(today()) as today;
SQL SELECT CAST(dtmAddedOn As DATE)  as dtmAddedOn
FROM SalesTable;


IF (ndtmAddedOn < Num(today())) then
EXIT Script;

rest of the script in multiple tabs
ENDIF; //(in last tab)


It's not working....why?

12 Replies
avinashelite

try like this

if condition Then

Exit script

else

rest of the script

end if

format:

if condition then

  [ statements ]

{ elseif condition then

  [ statements ] }

[ else

  [ statements ] ]

end if

alexandros17
Partner - Champion III
Partner - Champion III

Use

Exit Script;

Not applicable
Author

rest of the scrip is on different tabs

Not applicable
Author

exit is not working with if condition

avinashelite

I think that should not be a problem

avinashelite

can you please share your script

alexandros17
Partner - Champion III
Partner - Champion III

It should work but try before without condition.

Anonymous
Not applicable
Author

hi,

if you want to load only certain tables and still have other tables in memory.

maybe use partial reload option

Not applicable
Author

By using  Exit script function we can terminate the script