((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

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Definitive Guide to Data Quality

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



Introduction to Talend Open Studio for Data Integration.


Downloads and Trials

Test drive Talend's enterprise products.