Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Richard3
Contributor III
Contributor III

Correct use of conditionals in Qlik Nprinting

Create a condition so that the report is sent only if there are errors, for that I create a variable called vCantidadErrores, which tells me the number of errors observed, and place the condition in the report vCantidadErrores > 0 is true it is sent, but if it is not mayor the mail is also sent, what can I be doing wrong?

Labels (4)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I say your variable is not expanding as explained in documentation: https://help.qlik.com/en-US/nprinting/May2023/Content/NPrinting/Troubleshooting/Variables-dont-expan...

So the questions are:

  • how is your variable created?
  • is it constant or expression
  • if it is expression does it expand? (do you have = sign in front of the expression definition)?

I would also use reference where variable is equal to a value, like:

  • say you can set it up so it is vCantidadErrores = 0 with FALSE to be used as a trigger

but as I said before - I think you made a mistake and your variable probably does not expand so check that first.

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.

View solution in original post

4 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I say your variable is not expanding as explained in documentation: https://help.qlik.com/en-US/nprinting/May2023/Content/NPrinting/Troubleshooting/Variables-dont-expan...

So the questions are:

  • how is your variable created?
  • is it constant or expression
  • if it is expression does it expand? (do you have = sign in front of the expression definition)?

I would also use reference where variable is equal to a value, like:

  • say you can set it up so it is vCantidadErrores = 0 with FALSE to be used as a trigger

but as I said before - I think you made a mistake and your variable probably does not expand so check that first.

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.
Richard3
Contributor III
Contributor III
Author

The variable is created in the Qlik Sense upload script.
I have it defined in the condition as a constant.
Attached the detail for anything else you can see.

Richard3_1-1689695021419.png

 

Richard3_0-1689694941772.png

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

that is 25% of what we need... another 75% of information we need is:

  • How does the variable look in Qlik Sense variable editor?
  • That will give us answer if value of variable set in script evaluates to a number you want it to
  • Also, once you reload the app - how much time after you run your NPrinting report?
    • just for testing - have you tried re-generate metadata before running report/task so the condition could be evaluated?

cheers

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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Richard3 

can you confirm what was your issue and what has helped you? Thanks

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.