I converted number to text got the size (number of zeros) and then did round.
ROUND (fieldname,SIZE(WORD(NUMBERTOTEXT (fieldname),".",2))) .
This worked
------------------------------
Kavitha Rout
------------------------------
Original Message:
Sent: Thu July 11, 2024 01:03 PM
From: Lisa Edwards
Subject: fractional part getting removed when its 0
Hi Kavitha,
Sounds like you want to define it as a text field if you need to preserve whatever number format comes in and it could be variable. Then you can use TEXTTONUMBER() if you need it for a calculation. The current number format you're using is making the decimal part optional and because there is no mathematical difference between 100 and 100.00 or 100.0000 - it will always come out as 100 when defined as ###.[##]. If it is text/character it will come out exactly as it comes in since it is not treating it as a number for presentation purposes.
Happy mapping!
------------------------------
Lisa Edwards
Software Engineer / Subject Matter Expert
Rainbow Data Systems, Inc
Original Message:
Sent: Tue July 09, 2024 03:51 PM
From: Kavitha Rout
Subject: fractional part getting removed when its 0
The fractional part is getting removed when fractional part is 00. I want the output to match the input format exactly
current behaviour:
if input
is 100.00 , output generated is 100if input is 100.05 then output is fine which is 100.05
Expected behaviour:
if input is 100.000 then output should be 100.000
if input is 100.00 then output should be 100.00
Format in type tree is ####.[##].
Decimal min is 0
Decimal max is not mentioned
------------------------------
Kavitha Rout
------------------------------