Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
stephbzr
Contributor III
Contributor III

Converting from integer to string gives null

Hello,

I try to display the number of rows (tFileRowCount) in String after conversion (for a string column in database), but I have "null" as value. However, before the conversion, the value is displayed well.

 

0695b00000UxmW3AAJ.png

In the tJava, I have :

System.out.println(((Integer)globalMap.get("tFileRowCount_1_COUNT")));

and it displays my integer correctly like 25000.

In the tJavaRow, I have :

globalMap.put("nb_lignes_fic", String.valueOf(((Integer)globalMap.get("tFileRowCount_1_COUNT")))); 

System.out.println(((String)globalMap.get("nb_lignes_fic")));

and it displays "null".

 

I have to convert this integer to a string for the string column that retrieves this data from the database. But I don't want to insert "null".

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Can you show us a bit more of your job please? This could be down to a timing issue.

View solution in original post

3 Replies
Anonymous
Not applicable

Can you show us a bit more of your job please? This could be down to a timing issue.

stephbzr
Contributor III
Contributor III
Author

Indeed you are right, it is a bad order of sequence. I corrected it by changing the order of the connectors. Thanks a lot for this idea !

Anonymous
Not applicable

Not a problem. Whenever you get null where you are expecting a value, it is always a good idea to look at the data and the sequence of events. You knew that the data was OK, hence my first thought of it being down to the sequence of events. Thanks for letting us know that it is sorted 🙂