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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

I need help... please (Context param return null)

 

 

hi all,

 

I have this job...

 

0683p000009M99T.png

 

tFileInputDelimited is...

0683p000009M99Y.png

 

and, Param_CMD

0683p000009M99d.png

0683p000009M99i.png

 

 

tFlowTolterate

0683p000009M99n.png

 

and call another job (MD_O_GCTR02HT_01)

Component...

0683p000009M97T.png

 

and MD_O_GCTR02HT_01(Context)

0683p000009M8xZ.png

 

tJAVA...

0683p000009M99s.png

 

Debug JOB...

0683p000009M8ly.png

 

I NEED HELP PLEASE... THANKS...

Labels (3)
1 Solution

Accepted Solutions
manodwhb
Champion II
Champion II

@jklee88 ,check the below way. it is working ,check have you followed these steps.

 

0683p000009M9AC.png0683p000009M9AH.png0683p000009M9AM.png0683p000009M9AR.png0683p000009M8x6.png

View solution in original post

12 Replies
Anonymous
Not applicable
Author

Hi
You can't get the value of global variables in Context views. If you want to specify value to context variable, do it on a tJava after tFlowToIterate. eg:
tFileInputDelimited--main--tFlowToterate--iterate--tJava--oncomponentok--tRunJob
on tJava:
context.p_DT_FR=(String)globalMap.get("row1.p_DT_FR")
....

Regards
Shong
Anonymous
Not applicable
Author

Thank you for reply,

 

But, same error occured...0683p000009MPcz.png

0683p000009M8mR.png0683p000009M8NC.png

 

Thanks you...

manodwhb
Champion II
Champion II

@jklee88 , in your sub job , you need to connect by trigger>>on component ok option from the tDBrow to tJava .

 

Anonymous
Not applicable
Author

the context variables defined in the child job have been assigned values on tRunjob, just print the value on tJava to check if the values are passed correclty, eg:
in the child job:
tJava--oncomponentok--tDBRow_1

on tjava:
System.out.println(context.p_DT_FR);

Anonymous
Not applicable
Author

@manodwhb , component ok change main ...

 

it is same result...0683p000009MPcz.png

Anonymous
Not applicable
Author

@shong , child job contexts...and parent job component, and tJAVA

 

0683p000009M99x.png0683p000009M9A2.png0683p000009M99y.png

 

The results are the same...

In debug, parameters appear, and when run, parameters appear NULL...

Anonymous
Not applicable
Author

You have defined context variables in child job, and use these variables in any where. Don't need to define the global variables again. Print the value of context variable.
on tjava:
System.out.println(context.p_DT_FR);
Anonymous
Not applicable
Author

@shong  , thanks for your reply....

 

tJAVA ...

0683p000009M9A7.png

 

Still Parameter value is null...0683p000009MPcz.png

 

The same result is if delete and create a new job. Why continue to return null?

 

 

Anonymous
Not applicable
Author

Can you change the code of tJava to:
System.out.println(context.p_DT_FR);