cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping rule for Decimal Point

Former Member
0 Kudos

Hi,

We have a requirement where we need to generate the decimal point in the value based on the field.

We have 2 source fields NumOfDec and Value and target field Netprice. requirement is based on the Number of decimals in the

NumOfDec field and target netprice field shd have value with those many decimal value.

Eg:1

Suppose Value = 234

NumOfDec = 2 then netprice = 23.4

Eg:2

Suppose Value = 7650

NumOfDec = 1 then netprice = 765.0

If we are doing using Graphical using Power and Divide functions, its working fine but when the value is ending with zero, it doesnt show zero value in the output

as in the above example the out put shd be 765.0 but we are getting 765 when NumOfDec = 1. Jus trying if We can achieve this without UDF.

Regards,

Varun

Accepted Solutions (0)

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

You can use arithm. function formatNumber, combined with if statement for NumOfDec, which could be 0,1,2 for example.

Be careful when you use Divide, as rounding of PI is not always correct.

better create a UDF based on BigDecimals