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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Convert String to BigDecimal

Hi,
I have a problem writing an expression in tMap. I want to convert a field which is a String to a field which is BigDecimal.  I also need to check the content of String field - if it has "szt" then I need to send 1 and if not then I need to send the value of the field (converted to BigDecimal).
Thanks for all the suggestions because I'm stuck 😕
Labels (2)
1 Reply
Anonymous
Not applicable
Author

str == null ? null : (str.contains("szt") ? new BigDecimal(1) : new BigDecimal(str))
Lin LIN
Consultant BI/Talend
Synaltic Group