Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
bernhard2760
Partner - Contributor III
Partner - Contributor III

Reload Task based on multiple trigger events

Dear Community,

using QS February 2018 I discovered a behaviour I do not understand. The goal is to trigger the loading of an app based on an other app wich is loaded on schedule. To achieve that you need to considere the scheduled and a manual trigger event.

Inserting two events in the TaskLine however did not work out. I think it just worked for the fist line.

In order to cover both types of events I had to add a second task event containing one task each.

Does anybody comprehend that?

Kind regards

Bernhard

3 Replies
chriys1337
Creator III
Creator III

Hello,

I have a similar issue.

 

I would like to refresh an app, only once a week and only after another task run successful.

 

I have therefore created one task,with a weekly trigger and tried to add a second event trigger. But it looks like the two triggers are now working independtly. This means once a week the app is refreshed + the app is refreshed every day (because the predecessor runs daily).

Does anbody know how to achieve it, that the tasks runs only when both conditions are fullfulled?

mikaelsc
Specialist
Specialist

task lists triggering a task work as "OR" (like many things in qlik...) 

eventually try to use some data (small table generated by both apps) to conditionnally execute a script: https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Scripting/Scrip...

(making it fail on purpose in order not to trigger the task of your final reload: inspiration here : https://community.qlik.com/t5/New-to-QlikView/Force-script-to-fail-based-on-condition/td-p/1372402

autoAPP1: store reloadDate into Date_QVD1

manualAPP2: store reloadDate into Date_QVD2

 

middle APP: load DateToday from QVD1 and QVD2; (reload daily, hourly, whatever) 

if table contains less than 2 records --> make the script fail

else --> ok 

 

final APP triggered by success reload of Middle App. 

 

anderseriksson
Partner - Specialist
Partner - Specialist

It's a little more complicated than that.
If you have several Triggers the logic between them is OR.
But if you have a Start on task event Trigger the dependencies inside that singel trigger have AND logic.
Thus you should configer a single Start on task event Trigger with two dependencies.
When both those dependencies have triggered your task will run.

On the other hand if you want your task to run whenever either of your dependent tasks have run you should set up two Start on task event Triggers each dependent on one of the other tasks. Either task running will trigger your new task independently of the other task dependency.