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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set context parameters dynamically in tJava

Is this possible. I tried a sample job and it din happen happen.
Labels (2)
7 Replies
Anonymous
Not applicable
Author

I am able to pass context parameters set dynamically in a jave file from one job to another subjob. But this is not working when i pass it to a sub-sub job......... Any other way out?
Anonymous
Not applicable
Author

Any inputs please ?
Anonymous
Not applicable
Author

You can set contexts via tjava using the following example:
context.myContext = "myValue"
to pass it to a subjob you can use tRunJob component with the Transmit Whole Context option or the individual context paramaters options.
Hope this is what you're looking for.
Anonymous
Not applicable
Author

i am doing this ....... but this works only for a subjob .......... if i want to pass it on to further subjobs , it does not work!!! 0683p000009MPcz.png
Anonymous
Not applicable
Author

i tried using tContextDump also .... but it only works for pre configured context parameters ... for a context variable being set dynamically in tJava , it does not work !! any workarounds here ?
Anonymous
Not applicable
Author

Hello
Please upload some screenshots of your job.
Best regards
shong
alevy
Specialist
Specialist

I can't any more find where I came up with this answer but apparently context values are stored in more than one place and tContextDump picks up only those values defined when the job begins so if you set context values dynamically using tJava you need to follow with the following statement so that tContextDump will use the new values:
context.synchronizeContext();