Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
McDon
Contributor III
Contributor III

Accessing a context variable in a "Run If" connection

My scenario is that I have a "Run If" connection that I want to access a context variable as part of the condition.

The overall goal: Define a path from a tLoop that will only execute if the iteration limit was exceeded (telling me that it did not find anything)

Here is the job with the Run If connection

0695b00000KCZurAAH.png

My condition logic is

 ((Integer)globalMap.get("tLoop_1_CURRENT_ITERATION")) == ( (Integer)maxIterations )

Which generates this error

0695b00000KCZw9AAH.png

Originally I used 'Ctrl+Space' to select the context variable

0695b00000KCZtBAAX.png

However with just the context variable name

 ((Integer)globalMap.get("tLoop_1_CURRENT_ITERATION")) == maxIterations

Which produced the same exact error above.

Removing the "Run If" connection and related tWarn allows me to run the job successfully

0695b00000KCZzDAAX.png

How do I access a context variable in a "Run If" connection?

I tried globalMap but that defeats the purpose. I would have to access it to put it out there.

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

To use context variable, the expression is: context.varName, so, try

context.maxIterations

 

Regards

Shong

View solution in original post

2 Replies
Anonymous
Not applicable

To use context variable, the expression is: context.varName, so, try

context.maxIterations

 

Regards

Shong

McDon
Contributor III
Contributor III
Author

Thank you Shong.

When I did ctrl-space and selected that context variable the first time it only returned varName so I thought in that component that was expected. Thought I tried your suggestion prior but just tried it again and it seems to work - thank you for the incredibly quick turn-around