((Integer)globalMap.get("tMsgBox_4_RESULT"))) at TMAP

Seven Stars

((Integer)globalMap.get("tMsgBox_4_RESULT"))) at TMAP

Hi guys. I am getting a variable from tMsgBox_4 and I want to use the value (it's a number) inside TMAP. I am using this to get the result but I am getting an error.
row1.recaudacionSINIVA -  row1.cambiocargado - row1.CC_recaptacio - (row1.visita * ((Integer)globalMap.get("tMsgBox_4_RESULT"))) - row1.CC_Caducados + row1.FACTURACION - row1.CC_facturacio 
Exception in component tMap_1java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
Six Stars

Re: ((Integer)globalMap.get("tMsgBox_4_RESULT"))) at TMAP

Hi, try this: Integer.parseInt((String)globalMap.get("tMsgBox_4_RESULT"))
You can't cast a String to an Integer object.....Smiley Happy
bye

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Why Companies Move to the Cloud: 7 Success Stories

Learn how and why companies are moving to the Cloud

Read Now