
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Convert String to Int
Hi,
I am trying to convert my String value to an Integer, but not having any luck. The field either has a number, or a NULL.
I have tried the following within TMap, but this doesn't work
Integer.parseInt(row1.comp_number)
Any idea how to pass this through, please?
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Steven Littlewood ,
try this using tMap or tJavaRow...
row1.comp_number!=null && !row1.comp_number.trim().equals("")? Integer.valueOf(row1.comp_number):null
++++gift
Select as Best if its OK
Kind regards,
😷19.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Steven Littlewood ,
try this using tMap or tJavaRow...
row1.comp_number!=null && !row1.comp_number.trim().equals("")? Integer.valueOf(row1.comp_number):null
++++gift
Select as Best if its OK
Kind regards,
😷19.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much for your help, that has worked for me. Thank you also for the hint sheet, I am sure this will come in very useful!
