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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Run If Condition Statements

Good Afternoon,
I hope you will pardon what might be a daft question.
I have 2 tOracleSP components. The returned result of the first SP determines if the second SP gets run or a separate block of components do.
What I'd like to achieve is:
--- tOracleSP_1 --- Run If (tOracleSP_1.returned value == 0) --- tOracleSP_2
--- Run If (tOracleSP_1(returned value != 0) --- Some other component.
My problem seems to be how to access the returned value from the SP. Can anyone advise?.
Regards.
Nobby.
Labels (2)
3 Replies
alevy
Specialist
Specialist

Give tOracleSP_1 a schema column and use it for the "Is Function / Return result in" option. Pass a row from tOracleSP_1 to tSetGlobalVar to store the returned value in the globalMap. Hang the RunIfs off tSetGlobalVar, checking the globalMap variable as your condition.
Anonymous
Not applicable
Author

Alevy,
Thank you for the reply.
To get this part of my job working I had done exactly that!. Would I be correct in assuming the "Run If" trigger can not access a parent's variables directly?.
Regards.
Nobby.
Anonymous
Not applicable
Author

Hi NobbyHall
Not exactly, there are global variables of component (such as number of lines in an input component) and there is a result of component.
first ones are global variables of your job and the if link can access them (see the outline view on your studio).
the second ones are result of an execution and generally they can be put on data flow, they're not really variables unless we put them on variables such as suggested by alevy with the component tSetGlobalVar, once they're set as global variables the if link can directly access them (as variables not as data flow)