Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
DavidETL
Contributor III
Contributor III

Context Variable to Global Variable for if statement

Hi all

 

I have a job which uses a tsetglobalvar component which works great. I have tried to create Context variables with user inputs then pass the values into the tsetglobalvar in place of the hard coded ones. Everything is working well, apart from the "if statements" to begin sub jobs, which no longer seem to be detecting the value, any ideas? 

 

I have tested it via the Tlog and it does output the correct value, therefore can not work out why the "if statements" not longer work.

 

Below is the context settings.

0683p000009M53g.png

 

Below are the tSetGlobalVar settings.

0683p000009M53l.png

 

Below is what is in the if statement.

0683p000009M53v.png

 

My test with Tlog

0683p000009M540.png0683p000009M545.png

 

 

Labels (1)
  • v7.x

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

 

    Could you please try to give below condition in if clause?

 

context.varGetResults.equalsIgnoreCase("Y")

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

2 Replies
Anonymous
Not applicable

Hi,

 

    Could you please try to give below condition in if clause?

 

context.varGetResults.equalsIgnoreCase("Y")

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

DavidETL
Contributor III
Contributor III
Author

Hey, Thanks that has worked. Well done.

Appreciate your effort