Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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:
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 status | Conditions | Results | ||||
---|---|---|---|---|---|---|
Any? | User filter? | Report Condition | Task Condition | Email sent? | Report attached? | Notes |
True | True | True | True | Yes | Yes | Has assignments, gets email; good |
True | False | True | True | Yes | No | No assignments but gets email without report; bad |
True | True | True | False | No | N/A | Task level condition works - no email sent |
True | True | False | True | Yes | No | Report level condition works - no report attached |
True | False | True | False | No | N/A | Task 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
Ciao Francesco,
I tested your configuration and reports for users that don't met the condition are not produced and not sent.
I suggest:
- check all the production chain: users, filters, connections etc to be sure that all is ok
- check also the Qlik NPrinting logs to see if there are some useful mesagges
- open a support ticket because I'm not able to reproduce your issue so I cannot deeper investigate
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.
Thanks, rpc, the upgrades solved our problem.
It may not be the cleanest approach, but I've created filters at the user level and then conditions at the report level within the task (that data exists, basically). With that combination, users only get a message if there is data relevant to them and they see just that data in their report. It's a little more nuanced so that the user gets one of several different emails depending on whether their tasks are up to date, almost due, or overdue.
I have been using this technique as well. Unfortunately beginning with the Apr 2018 release this no longer works. The message will be sent anyway with an error along with an error message.
I opened a case with Qlik Support and the answer was that the condition/filter should NEVER have worked and the current functioning is the way is should work. I was very disheartened to find that there is no longer any way to avoid sending an email to a user based on a user filter, report condition as we previously did.
I also noted that the documentation is written very poorly.
> 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.
[What does this mean?]
Hi,
> If there is a task filter, the filter will be applied when evaluating the condition.
The condition will be evaluated with the dataset that results after the task filters application. If the task condition is not met the execution is stopped.
> If there is a report or user filter, the filter will not be applied when evaluating the condition.
The task condition is evaluated without using the report and user filters. Report and user filters will have no influence on task condition result.
> If you apply a condition to a task report, task, report, and user filters are always applied when evaluating the condition.
If you apply a condition to a report in a task (instead of applying it to the task) all filters applied to task, report and user will be calculated before to evaluate the condition. So the condition is evaluated with the dataset that results after the application of all filters.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. 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.
Hi,
April 2018 is working as previous.
In my opinion if the mail is sent you have to check:
- if there are attached or embedded other reports that are not under condition. If yes the mail is sent.
- if the email contains an error message. It there is an error in calculating the result of filters the email could be sent.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. 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.
Thanks for your reply and I have a few points to add.
Now that you "explained" the documentation, the last phrase is clearer. I think you might want a semicolon instead of a comma. (see below)
"If you apply a condition to a task report; task, report, and user filters are always applied when evaluating the condition."
or better:
"If you apply a condition to a report in a task; task, report, and user filters are always applied when evaluating the condition."
Secondly, last month I had a screen sharing session with a Qlik support engineer who is the Nprinting support expert. He told me, even after looking at the documentation together, and looking at my task and report, that there was no way I could do what I wanted, i.e. not have the report send an email even if the condition failed.
I think support should have a clearer idea of how conditions & filters work in Nprinting tasks.
Lastly, the issue, which the support engineer didn't discover, but I figured out, was that what was happening that some of our data changed and the filter in one particular case was being set to a value that doesn't exist. In this case the email is being sent anyway along with an error message. I wrongly attributed this to the Apr 2018 release which unfortunately was concurrent with the change in our data.
The task error is:
Failed generation of report 2e826ac3-ac37-48b6-94a9-a2126cd98013 for user fb38b267-dcfd-4814-b6bb-63c2a8e73773. ERROR: Cannot apply filter Filters: [Fields: [Name: F\IOEmployeeCode, ConnectionId: 7febc23c-1903-450d-94b3-ae28a2f83de8, Values: [String:KABCDEFGH], Override: False, Void: False], Void: False], Bookmark: , Void: False to current document data. Requested fields with evaluates are:
Hi,
I'll send your suggestions to the documentation team and your feedbacks to the support team..
Note that in recent releases we did lot of improvements on the filters management.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. 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.
Hi Jonathan
Are you saying that if you get this error then there is nothing that can be done to stop the email going out albeit without a report attached? I get this exact error but have a condition set to check if chart has values so am confused as to why i get this error and the condition seemingly resolves to true and the email is sent. Surely this error means that the filters have not found any results so therefore the condition should resolve to false and the email shouldn't go out? Or have I missed the point?
Thanks
Gavin
Hi,
If the filters are correct you have no issues. Filters will return the right dataset, it will be used to evaluate the condition.
I thinks the error is generated by a wrong filter combination and that latest versions manages better errors like this.
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT https://community.qlik.com/docs/DOC-14806. 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.
I think Ruggero answer it pretty well. If you have a condition and it is false for all reports included in the task, then it won't send out the email. My problem was, due to some changes in the underlying data, the user filter I was applying was actually no longer a valid filter, i.e. the value specified in the filter was no longer in the Qlik Dataset. So Qlik would not even have the selection possible. NPrinting, justly, reports an error since its an impossible filter setting. I think it would be nice if it didn't send an error email to the final user, rather than the NPrinting admin, but I guess by sending to the end user, it does make the Nprinting developer/admin more responsive