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: 
Anonymous
Not applicable

Run If Conditional Query

Hi,
I'm not able to find the answer in the documentation so i was hoping someone might be able to help me understand something.

I have a job which passes data into a child job through an iteration, the child job then passes back data which collects into a tHashOutput to be loaded in another subjob which contains the tHashInput.

I was getting errors when the first part of the process didn't extract any data (a common scenario in this routine) and so i linked the subjob with the tHashInput with a RunIF connection (using a ((Integer)globalMap.get("'my_connection'_NB_LINE")) >0 clause).
However, on doing this i started getting null pointer exceptions on the tHashOutput, so i'm not sure this is a viable way of performing this logic?

Basically, I want to know if there is a way of executing a subjob ONLY IF there is data populated in the hashInput, and i want to execute this subjob after all iterations in the first subjob have completed.

A simple mock up of my routine:

Subjob1)

FixedFlowInput --> FlowToIterate --> ChildJob --> tHashOutput

Subjob2)

tHashInput --> Load to a database.

Please help! Thanks 0683p000009MACn.png

Labels (2)
4 Replies
TRF
Champion II
Champion II

Hi,
It should work as it. If no row in tHashInput, nothing goes to the next step, and that's all.
Can you capture the job and share it?
Regards,
TRF
Anonymous
Not applicable
Author

0683p000009MFbf.jpg
I've attached a screenshot of the job - as you can see it is a little more complicated than my sample.

Basically - i just want the the brown subjob "Input Mambu Client ID into nCino" to only run when there is data placed in tHashOutput1. I'd tried connecting the brown subjob via a runIf as mentioned previously, but this didn't work.

(RunIF condition was  ((Integer)globalMap.get("'Out3_NB_LINE")) >0
JR1
Creator III
Creator III

The quick and dirty way would be to connect your OnSubjobOK coming out of "Create Client" to a dummy tJava component that does nothing (just leave the default in it) and then create a "Run If" connection from there to your "Input Mambu..." subjob with the condition you mention above. Please let us know if this works for you.
Anonymous
Not applicable
Author

Hey,
Thanks - i don't mind a dirty option! That certainly works for me - thanks for your help!