Hello all, I have an excel(sheet) as my input and SFDC connection as my output with a tMap in between. Currently it error's because it can't convert between the data types. Type mismatch: cannot convert from String to Double Type mismatch: cannot convert from Character to boolean I'm trying different ways with the tMap component in the expression part to get these convert but am not having much luck. Does anybody have any ideas to help me. Regards Lee
Thank you for the reply. Type mismatch: cannot convert from String to Double Double.parseDouble(row7.DELIVERED_COST) Type mismatch: cannot convert from Character to boolean row7.SPECULATIVE_BUILD__C("Y")?1:row7.SPECULATIVE_BUILD__C("N")?0:Null
The first error you posted (Type mismatch: cannot convert from String to Double Double.parseDouble(row7.DELIVERED_COST) ) is usually an issue with your field types. Double click your tMap to open it, then look at the bottom where it shows the Schema editor. Here you will see all your fields; they all have types associated with them like String, Double, Int, etc. You can change them by choosing another type from the dropdown menu (right beside the field names). Make sure that they fields are the correct type. I.e. make sure on the tMap the field that you are mapping this to "Double.parseDouble(row7.DELIVERED_COST)" is set to a double. As for the other line "row7.SPECULATIVE_BUILD__C("Y")?1:row7.SPECULATIVE_BUILD__C("N")?0:Null" you're not actually comparing anything. I think you meant: row7.SPECULATIVE_BUILD__C.equals("Y")?1:row7.SPECULATIVE_BUILD__C.equals("N")?0:Null
Thank you, The field is mapped to a double but still errors. After doing more research i see others have used a tConvertType would this help both my issues ? Lee
Could you upload a screenshot of your tMap window? I don't think the tConverType is necessary. I made some edits to my first post and I mentioned that for your second issue, you aren't comparing any fields. Did you mean to include a .equals()?