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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

arrays in globalmap variables

Hi
I'd like to store the value of a column into an array, each row in it's own element. Is there a way to accomplish this? I would need to be able to access the previous rows' values from the same array, so it should be a globalmap variable.
So it should be something like this:
globalMap.put("array",input_row.column_1);
Then I'd access them as follows:
globalMap.get("array")
row value
1 a
2 b
3 c
4 d
5 e
Array would be "c", as the array would be populated starting from 1 only.
Thanks in advance
Labels (2)
4 Replies
Anonymous
Not applicable

Hi
Why don't you just put all these data into globalMap?
I don't think it will make things simple to save an array in globalMap.
Regards,
Pedro
_AnonymousUser
Specialist III
Specialist III
Author

Why don't you just put all these data into globalMap?
I don't think it will make things simple to save an array in globalMap.

Hi
Do you mean I should create a one globalmap per row? I can have 1-n rows coming in, and array would be flexible in that regard, as it can store any number of values.
Is it impossible to store arrays in globalmap at all?
Thanks
Anonymous
Not applicable

For people who might end up here, like me, the answer is: as long as it's an object, globalmap accept it. But you have to know its class. For an array, you can use a java.util.List in the old fashioned way of java programming.
Anonymous
Not applicable

you can use List,and put List into globalMap