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: 
chriswellington
Contributor II
Contributor II

NP17 Conditional Task: Don’t send email if no data?

Hi,

So, I’m new to posting since this forum already has so much useful content! This time I'm comping up empty, though...

I'm using NPrinting to send simple email with Excel report to about 30 people when they have outstanding assignments (based on data in QlikView). I’m using a single task to distribute the emails with filters at the user level so each individual only sees their own assignments. So far so good.

The issue arises when a user has no outstanding assignments. In this case, the chart of assignments is, naturally, blank. I’ve created a condition with the rule “Chart CH01 has values” so these users won't get the reminder email.

Within the given Publish Task in NPrinting, I see two ways to apply conditions:

  1. Apply condition to the report, and
  2. Apply condition to the task.

If I apply the condition to the report, then the Excel report is only generated when the user has assignments to complete, but the email is still sent whether or not there is an associated report.

If I apply the condition to the task, then the condition appears to only be checked once without considering the user-level filters.

Below are some of the combinations I've tried and the results:

Condition: CH01 Has Data. This should be True if anyone has assignments (for column "Any?") or if the given user has assignments (column "User filter?").

Assignment statusConditionsResults
Any?User filter?Report ConditionTask ConditionEmail sent?Report attached?Notes
TrueTrueTrue TrueYesYesHas assignments, gets email; good
TrueFalseTrueTrueYesNoNo assignments but gets email without report; bad
TrueTrueTrueFalseNoN/ATask level condition works - no email sent
TrueTrue FalseTrueYesNoReport level condition works - no report attached
TrueFalseTrueFalseNoN/ATask level condition does not respect user filter

Is there a way to apply conditions after user-level filters so that emails are only sent if the conditions are met? I don't want to generate separate tasks for each user!

NPrinting Version: 17.1.2.0

Thanks!

Chris

1 Solution

Accepted Solutions
Ruggero_Piccoli
Support
Support

Hi,

Upgrade to latest version September 2017 (17.5) by following the instructions in Qlik NPrinting upgrade ‒ Qlik NPrinting

Qlik NPrinting September 2017 will send emails only to users who have data.

Best Regards,

Ruggero

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

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.



Best Regards,
Ruggero
---------------------------------------------
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 with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.

View solution in original post

35 Replies
jonoogle
Contributor III
Contributor III

I have the same problem. I'm not sure if I understand your chart above but I think the simplification of the problem is that it seems as task level conditions are evaluated BEFORE filters are applied. Which means that the email is going out independent of the filter. 

I submitted a ticket on this hoping for a better explanation or work-around and I'll be glad to post the response.

Have you found any work-around?

Ruggero_Piccoli
Support
Support

Hi,

Upgrade to latest version September 2017 (17.5) by following the instructions in Qlik NPrinting upgrade ‒ Qlik NPrinting

Qlik NPrinting September 2017 will send emails only to users who have data.

Best Regards,

Ruggero

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

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.



Best Regards,
Ruggero
---------------------------------------------
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 with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Anonymous
Not applicable

This is not true. I have the Version 17.5.

But the user without data, became also a email. The message in the email is:


Some errors occurred during report generation
Number of reports not generated: 1
Please contact your administrator for further details

Chanty4u
MVP
MVP

check this might help

Re: RE:conditional report

Anonymous
Not applicable

Hi Ruggero,

I'm in the same situation as Chris but running September 2017 version.

Still gettting mail sent without report in case of user filter produces and empty report because report conditions seems to be evaluated before user filters.

Can you advise?

Regards,

Giuseppe

Ruggero_Piccoli
Support
Support

Hi Giuseppe,

Here there are the rules about condition evaluation Conditions ‒ Qlik NPrinting

Best Regards,

Ruggero

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

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.



Best Regards,
Ruggero
---------------------------------------------
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 with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Anonymous
Not applicable

Thank you Ruggero,

at this point can you confirm that there is no way to apply conditions after user filters evaluation and hence there is no other way to achieve rather than creating as many tasks as the number of recipients?

Best regards,

Giuseppe

Ruggero_Piccoli
Support
Support

Hi Giuseppe,

Conditions affect when filters are applied. If you apply a condition to a task:

  • If there is a task filter, the filter will be applied when evaluating the condition.
  • If there is a report or user filter, the filter will not be applied when evaluating the condition.

If you apply a condition to a task report, task, report, and user filters are always applied when evaluating the condition.

So, you should apply at least one Condition to a report in a task. Before to create the report for each user, Qlik NPrinting evaluates the condition with the filters and only if it is met it will generate the report and send the email.

Best Regards,

Ruggero

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

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.



Best Regards,
Ruggero
---------------------------------------------
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 with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
francesco_menin
Partner - Creator III
Partner - Creator III

Hi Ruggero,

We're encountering the exact same problem with conditions on the same NPrinting version.

- We don't have a filter on the task

- We don't have a filter on the report

- We have filters by user

- We have a condition on the Report in the Task

The condition is of the type: the chart .... has values.

The chart is exported with empty tables.

It looks like the condition is evaluated before applying filters (my best guess is that content resolution means apply filters).

task_execution.png

Best,

Francesco