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: 
wangbinlxx
Creator
Creator

how to merge two process branches back into one?

Hi

 

My code starts with tPrejob => tFileExist to check if external context file exist,

                                IF not create a new file, and dump contexts into this file (5-6 components);

                                IF exists, run tContextLoad to load all contexts from external file.

 Then I want to do a few other tasks in tPrejob which only can be run after one of the above process is finished, how can I merge those two branches into one?

 

Certainly I add those other tasks into both branches via OnSubjobOk, but I don't want to duplicate the code.

 

Thanks,

Bin

 

 

                            

 

 

 

 

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

This is another way, as there are often many solutions for the same problem.
However, don't forget to mark the case as solved.
Kudos also accepted.

View solution in original post

3 Replies
TRF
Champion II
Champion II

Just add a 3rd "if" statement (order 3) after the tFileExists component with a condition which evaluates to "True" at anytime such as "1 == 1" and connect the desired sequence after this new "if".
That's all.
wangbinlxx
Creator
Creator
Author

Thanks TRF.

I found a way: Use OnSubjobOK from tFileExists component. 0683p000009M9xp.png

 

 

 

 

 

TRF
Champion II
Champion II

This is another way, as there are often many solutions for the same problem.
However, don't forget to mark the case as solved.
Kudos also accepted.