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: 
AlSalvC
Contributor II
Contributor II

Bug in tsetGlobalvar with multiple variables

Hi, everyone.

I'm having an issue when trying to assign different values to different global variables with tsetglobalvar. It gives the value of the last set variable to all the other variables. look at the image attached.

All the variables get the value of the DestinationSchema and I dont know why.

Your help is very much appreciated.

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable

If you need to assign the input value to context variable, use tJavaRow instead of tsetGlobalvar component, eg:

...main---tJavaRow

 

on tJavaRow:

context.varName=input_row.columnName;

 

 

View solution in original post

2 Replies
anselmopeixoto
Partner - Creator III
Partner - Creator III

Hello @Lucas Pujol​ 

Try putting the Key names between quotes like "DestinationUrl" for example. I'd also suggest you to remove "context." from global variable names to avoid mistaking them with context variables.

 

Then test your Talend Job again using the following syntax:

 

((String)globalMap.get("DestinationUrl"))

 

Remember to change the String data type according with the type of each variable defined in your "row12" data structure.

Anonymous
Not applicable

If you need to assign the input value to context variable, use tJavaRow instead of tsetGlobalvar component, eg:

...main---tJavaRow

 

on tJavaRow:

context.varName=input_row.columnName;