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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
MZein
Contributor III
Contributor III

global map arraylist

Hi

comeback  again with new issue.

I define a global variable of type ArrayList using tSetglobalvariable component. The problem is that when i try to get this value in my project it always give me the error : The method globalMap(String) is undefined for the type ArrayTest ?

so how i get the value of this array. I am trying this example : http://bekwam.blogspot.com/2012/08/iterating-over-java-collection-with.html?m=1

thank you very much in advance for your participation to solve this problem

 

Labels (2)
7 Replies
Anonymous
Not applicable

Hello,

Could you please show us your syntax? Please check your "Code" tab in your job to see if there will be your compile error highlighted in red line.

Best regards

Sabrina

MZein
Contributor III
Contributor III
Author

Thank you Sabrina for your answer. Attached here with is the job that I try to implement it, it is an example in this site http://bekwam.blogspot.com/2012/08/iterating-over-java-collection-with.html?m=1. I follow all of the instruction but always give me the following error (Array list is not defined for globalMap !!). Yes in the code part it highlight in red and give the same error message. 

Reagrds

MZein
Contributor III
Contributor III
Author

Is there any help or answer as it seems to me talend has a problem with defining and getting arraylist as global variables

Anonymous
Not applicable

Hello,

From the error message "The method globalMap(String) is undefined for the type ArrayTest ?", there is no the method globalMap(String) in the type ArrayTest which is not explained in this blog. How did you define and get arraylist as global variables in your own job?

Best regards

Sabrina

 

MZein
Contributor III
Contributor III
Author

Hi 

Thank you for your replay

I define global variable using setGlobalVar as follows

key is MyEnv

value is new ArrayList<String>()

Regards

Anonymous
Not applicable

Hello @MZein 

Is there any X-mark in your component? How about your tJava_1 component setting? Would you mind sending your job to me and I will debug from my side if needed?

Best regards

Sabrina

MZein
Contributor III
Contributor III
Author

Hello @xdshi  and many thanks for your collaboration. yes you can find attached my job. and the details is in the link 

http://bekwam.blogspot.com/2012/08/iterating-over-java-collection-with.html?m=1

best Regards


arraylist.PNG