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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
sogloqlik
Creator III
Creator III

Condition on Today()

Hi.

I Have a Daily Task in Qliksense which end around 07:00AM

A report Based on the application in the task is send by mail from the Nprinting daily around 07:30.

To know whether the task in the Qliksense was completed I Chose a workaround:

A Variable - vToday - was defined in the application

In the Nprinting I created a Variable condition and tried to compare vToday to today() by an expression.

I used the condition in a published task.

I get a false result regardless the expression:  =today(), =num(today()), =floor(today())....

I checked the variable and the expression in a report - They give the same result.

So why is the condition not fulfilled?

Im using Nprinting Sep.2017(17.5) and qliksense november 2017

Regards

Motty

4 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

how is your variable created in application and what value does it return?

share expression of it!!!

This was described by me so many times already and as usual comeas either to evaluation of your variable or data type of the values on both ends.

So if your variable returns date in the date format like say: 2018-01-01

then your expresion would have to be =text(date(Today(),'YYYY-MM-DD'))

Ideally your variable returns integer value and in nprinitng you would use then function you mentioned above floor(today());

cheers

Lech

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
sogloqlik
Creator III
Creator III
Author

Solved.

The variable is as simple as it sounds: =Today()

But the Nprinting is using $(vToday)

So writing the expression as $(=( Today() ) ) Solved the problem

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Motty

just to confirm -  you have in your load script line with the code:

Let vToday = Today();

To ensure that your solution works you need to have done this way. If you created your variable on front-end with "=" sign, then your variable will ALWAYS return todays date - and your check will not be valid

What i was saying is to have a following formula in script:

Let vToday = Floor(Today());

and in NPrinitng condition check: = Floor(Today())

I do not think you should use $ sign expansion in your condition check in NPrinting.

regards

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
sogloqlik
Creator III
Creator III
Author

Hi Lech.

I Will Check up your comment/

Thanks for the tip.

Regards,

Motty

P.S - what is the difference between defining the variable in the script against defining it in the gui.