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: 
Anonymous
Not applicable

[resolved] Is it a bug when using List of Value type context?

Hi,
I defined a context with type "List of Value", however TOS throws cast exception when running the job. And I can see in code that variable actually is defined as "String" under public class ContextProperties. Is this a bug in TOS 6.1?
Please find "userList" and "partyList" from below screenshot.

0683p000009MFRx.png 0683p000009MFVe.png
Labels (2)
3 Replies
Anonymous
Not applicable
Author

Hi,
Are you using Mac OS? Here is a related jira issue: https://jira.talendforge.org/browse/TDI-34539
Best regards
Sabrina
Anonymous
Not applicable
Author

No, this isn't a bug. This is just down to very poor documentation. The "List of values" option for Context variables isn't to create a List it is to help you create a a drop down menu for users in Studio if you click the "Prompt" tick box in the Context variable config. Try it. When you run the job it will prompt you to select one of your values from a drop down. 

If you want to have a list added as a context variable, there are several ways of doing this depending on your ability with Java. The easiest way is to just use a comma separated String and use a tNormalize component to split them. However you can use the Object Context type to hold any Java class. So you can pass an ArrayList to it and make use of that ArrayList in a tJavaRow/tJavaFlex.
Anonymous
Not applicable
Author

Thank you Rhall, I am using Object type now.