Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Run the script only on a monday

Hello qlikers 🙂 ,

I have written a script. But only a small area of the script should be run on a monday.

So for example, today is monday and the script should run the complete script. When we have friday the script should only run the area without the "monday script".

How can I do that?

Thank you in advance! 🙂

3 Replies
dplr-rn
Partner - Master III
Partner - Master III

You can use an if statement.

e.g.

if WeekDay(today())=1 then

// your statements

end if

Taoufiq_Zarra

or use the sub... end sub
for example

let todayis =num(Weekday(Today()));


sub monday (1)

Data:
load * inline [
test
1
]
;

end sub


sub otherday(1)

Data:
load * inline [
test
2
]
;

end sub

if $(todayis)=0 then
Call monday(1);
else
Call otherday(1);
endif
Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Kushal_Chawda

If weekday(today())=1 then

// Monday script goes here. Here you can put entire script.

else  

// Other day script. Here you can put script without Monday part.

endif