Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

Easier way to skip one tab of the script?

Hi,

up to now I know of only one way of skipping a piece of code under certain circumstances - for instance, I have here a piece of code that should run only on Friday (the app is reloaded daily) because on Mo-Thu, the directory where the code searches for files is probably empty. That is the IF ... THEN clause.

That is only a bit "complicated" insofar as I have to put the entire code inside this clause.

Is there some way that I can make this easier and just use sth. like the "Goto ..."  command to make the execution of the code jump to the last line of the tab when the condition is not met?

Thanks a lot!

Best regards,

DataNibbler

1 Solution

Accepted Solutions
marcus_sommer

Hi DataNibbler,

wouldn't an approach like this work?

if weekday(today()) = 4 then

     load something

elseif some condition

     do something else

else

     do nothing

end if

- Marcus

View solution in original post

2 Replies
marcus_sommer

Hi DataNibbler,

wouldn't an approach like this work?

if weekday(today()) = 4 then

     load something

elseif some condition

     do something else

else

     do nothing

end if

- Marcus

datanibbler
Champion
Champion
Author

Hi Marcus,

yes, of course this would work. Only it would not necessarily make the thing easier.

Well, it's actually easy enouth if the IF...THEN clause is closed at the very bottom of the tab. That is pretty easy to find. It works, too, so there's no point in spending a lot of energy on this.

Thanks anyway!

Best regards,

DataNibbler