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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
mfarsln
Creator II
Creator II

Create Variable to Check Reload Status

Hello,

I have an app which is reloading at 12:00 and 15:00. And i have a variable that checks if the app is okey to be mailed. I'm using this variable as task condition on NPrinting.

my_variable checks if max date of data equals to yesterday. Since i'm taking this data to sql, sometimes sql table populates after 12:00, so my_variable evaluates false.

So if my_variable = 1, NPrinting task executes. NPrinting task has 2 schedules on 12:15 and 15:15. 

If app reloaded at 12:00 and my_variable evaluated to 1 there isn't any problem. Problem is; at 15:15, nprinting task executes again since my_variable is still 1. And this causes duplicate mails.

I need to create variable that checks if  at first reload of day (12:00) my_variable = 1 then make it 0 for the next reload of day (15:00). Is there any way to do this?

Labels (1)
1 Reply
Nicole-Smith

You are able to refer to the variable within itself.  So you could probably add something like this:
LET my_variable = if(hour(now()) = 15 and $(my_variable) = 1, 0);