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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrew_Kruger
Employee
Employee

Conditional Report Task Execution

At Qlik Connect I had a few customer / partner discussions about conditional report task execution.  There are a few flavors of interest here:

  1. Only execute the task (in entirety) if a data condition exists
  2. Conditional distribution to a specific recipient within a task.  An ideation captures this interest here https://ideation.qlik.com/app/#/case/359666?cpid=85074b5c-74da-49ab-9934-67071023304d

These are both great capability interests which will get prioritized against the various feature requests we receive (there are many :-)).  Keep the great feedback coming on Qlik Ideation!

What are your options today?

Only execute the task (in entirety) if a data condition exists

Today you can setup a report task and configure it to execute based on a schedule or when data changes. 

However if the interest is for the basic scenario of only execute a task if some specific data state occurs you could consider a simple automation to verify the condition state and trigger the report task via Sharing Task API.  The benefits here is that you maintain the report task integrity with the integrated distribution list, history execution, filter control etc. 

The steps to take are:

  • Configure your report task in-app inclusive of, distribution list, filters, and schedule, etc.
  • Set the Task to a Disable state

Andrew_Kruger_0-1750683416503.png

 

  • Create an Automation to execute a sharing task using the Raw API blockAndrew_Kruger_1-1750683416506.png
  • Within the automation use the various Qlik Connector blocks to check the data conditions you might use to determine whether the report task can execute.

Tracking down the Report Task ID

  • You will need the ID for the report task to configure the API call – this is easily obtained via the Sharing Task – List all Sharing Tasks and a browser when logged into your tenant.  Be sure to specify the filter type=template-sharing (and optionally the appId if you have a lot of tasks)Andrew_Kruger_2-1750683416509.png
  • Search for the Task Name (assuming you have made it unique) and grab the “ID” value at the root of definition for the task (be sure to grab the correct “ID” - there are a few in the payload). 
  • Of course - always test before placing this strategy in operation

 

Conditional distribution to a specific recipient within a task

This is a much more complex requirement as it is a recipient level decision on whether to distribute the report.  This could be at the recipient level or even at the cycle level. 

Today the task will send a file to every recipient, even if the file is empty. 

Today there is no way maintain the report task structure and achieve this outcome – again we have an ideation linked above for which more feedback is welcome. 

For the adventurous – an option would be to use Qlik Automate to build your own report task – which would entail

  • Source recipient list and execute via looping
  • building a temp bookmark for each recipient
  • requesting the corresponding report using the Tabular and PixelPerfect blocks in Qlik Automate
  • managing the channel of distribution
  • writing your own audit log
  • testing!

 

 

Hopefully this post offers some ideas to consider while conditional report task execution makes its way through ongoing roadmap evaluation/prioritization. 

Labels (7)
2 Replies
F_B
Specialist II
Specialist II

Nice recap, thank you!

mikecrengland
Creator III
Creator III

Don't know if it's better or worse (or easier), but all I did was add a variable in the app to count the rows of a table that needs to be populated, then get the value and used it in a condition:

mikecrengland_1-1752614753339.png

mikecrengland_3-1752614801741.png

 

mikecrengland_0-1752614684526.png