Use result of tmsgbox YES/NO

One Star

Use result of tmsgbox YES/NO

Hello,
i'm using a tmsgbox with the YES/NO buttons. The goal of this, is that if user click YES job continu, if NO job is stopped.
I don't know how to do this.
I think simply use the trigger run if after my tmsgbox. As if condition i have set :
((String)globalMap.get("tMsgBox_1_RESULT"))=="1"
But this is always false. I don't know what is the value return by TmsgBox when YES or when NO.
Does anyone know it?
thkx,
jean
Seventeen Stars

Re: Use result of tmsgbox YES/NO

hi,
you are on the right way .
First use equals to compare 2 String in java.
when user clic "yes" , it return "0" so compare result box like this :
order 1
if
((String)globalMap.get("tMsgBox_1_RESULT")).equals("0")

do something (in my TjavaFlew : out.println("continue")Smiley Wink
order 2
else
!((String)globalMap.get("tMsgBox_1_RESULT")).equals("0")

do something else (out.println("stop");
One Star

Re: Use result of tmsgbox YES/NO

thank a lot

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.