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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog