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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Using tArray in tSetGlobalVar

When i try to use tArray variable (month) in tSetGlobalVar:
(String)((java.util.ArrayList)globalMap.get( "month" )).get(0)
i get error message:
java.lang.ClassCastException: zarplata.salary3.salary3$row6Struct cannot be cast to java.lang.String
Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hello
The tArray/tArrayIn/tSortIn are the virtual components. Please read this 2569 to learn more information.
After you define variables via tSetGlobalVar, you can use them like this in tJava/tJavaRow or other components:
globalMap.get("month")

Best regards

shong
Anonymous
Not applicable
Author

How can i get First element in tArray????
globalMap.get("month") doesn't work, error:
The type of the expression must be an array type but it resolved to Object
Anonymous
Not applicable
Author

Hello
How can i get First element in tArray????
globalMap.get("month") doesn't work, error:

tArray is a virtual component, you can't use it alone in a job and you can't get First element in tArray via the expression below:
globalMap.get("month")
Best regards

shong