Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
NEW webinar Dec. 7th: 2023 Outlook, A Pivotal Year for Data Integration SIGN ME UP!
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);