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 variable and vectors

I have save a set of data inside a vector in tJavaflex component. after that I generate global variable for my array as follows

globalMap.put("MyEnvironment", myEnv);

where myEnv is a vector of string.

How I can reuse this global variable in another component like tMap ( as a vector that i can index it)

By the way I tried  myv = (java.util.Vector<String>)globalMap.get("MyEnvironment"); to retrieve my vector but it return null !

 

Labels (2)
3 Replies
Anonymous
Not applicable

Hi
If myEnv is a column name, you need to change the expression to
globalMap.put("MyEnvironment", row1.myEnv);

// row1 is the input flow name.
on other component in next subjob, you can get the value with expression:
(String)globalMap.get("MyEnvironment")

Regards
Shong
MZein
Contributor III
Contributor III
Author

Thank you for your replay. I use it but the always the global variable takes the previous value of the input row. please note the photos. I want to generate a file for each value of env

Regards


env1.PNG
env2.PNG
MZein
Contributor III
Contributor III
Author

Hi, I forget to tell that myEnv is not a column name it is arrayList variable I generate it inside tJavaflex component. The most important thing is that why when I try to use this global variable (inside tmap for example) it consider it just as String not arraylist ?

Thanks to all and hope to help faster