Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Float.parseFloat, Type mismatch: cannot convert from String to Float

Dear all,
I try to cast from string to float.
I use java code in a tJavaFlex component : 
row2.coord = Float.parseFloat(row1.coord);

Of course, I select the right type for input (string) and output(float)
But i have an error : 
Type mismatch: cannot convert from String to Float

Thank you in advance for your idea!
0683p000009MCLY.png
Labels (3)
2 Replies
JR1
Creator III
Creator III

I suggest to use the tConvertType component instead of diving into custom Java coding. Its use is pretty straightforward and it does what you desire.
vapukov
Master II
Master II

use 
Float.valueOf(row1.coord)