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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

About run if trigger.

I use tRest to call web,and return data, tRest returns schema include Body and ERROR_CODE, if ERROR_CODE if null,means the call is OK.
So I use run if trigger to connect tRest and tjava, condition is : tRest.ERROR_CODE!=null . Talend return error:tRest cannot be resolved to a variable.
So how do i write this condition? I am a bit confused with the way to get value in talend, and can't find it in the document.

Labels (2)
1 Reply
Anonymous
Not applicable

Hi 
Link tRest to a tJavaRow and check the if ERROR_CODE is null there, eg:
tRest--main--tJavaRow--runIf--tJava
on tJavaRow:
if(input_row.ERROR_CODE!=null){
globalMap.put("hasError", true);
}else{
globalMap.put("hasError", false);
}
Set the condition as:
(Boolean)globalMap.get("hasError")

Best regards
Shong