Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've tried a few different regex in my tMap component for this input column and not having any luck. I have Input values like "0000000005200" Look at the screenshot below. These are String values and will stay a String through the tMap.
I''ve Tried
"".equals(row1.MAX_AMT)? "" : String.format("%05.2f", Long.parseLong(row1.MAX_AMT)/100.00)
Got this error
Exception in component tMap_1 (HHV_PreSelect)
java.lang.NumberFormatException: For input string: ""
row1.MAX_AMT.substring(0,row1.MAX_AMT.length()-2) --> First Variable row1.MAX_AMT.substring(row1.MAX_AMT.length()-2,row1.MAX_AMT.length()) -->Last Variable Var.First.replaceFirst("^0+(?!$)", "") +"."+Var.Last --> Output
Got this error
java.lang.StringIndexOutOfBoundsException: String index out of range: -2
at java.lang.String.substring(Unknown Source)
Please advise
Thanks
Andrew
Solved myself!
Solved myself!