cancel
Showing results for 
Search instead for 
Did you mean: 

adding leading zeros in a field mapping

Former Member
0 Kudos

Hi,

I am getting account as a 5 char field in the input file. I need to map this to a 10 char field in XI and add leading zeros in case the value is all numeric. Is there any standard data type/ mapping that can achieve this or I need to write a UDF.

Thanks,

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Input source --> Format Num (double click and give 0000000000) --> Target. Your issue solved.

---Satish

henrique_pinto
Active Contributor
0 Kudos

formatNum field will cause an exception if your input isnt all numeric...

I'd go for UDF id your input isnt always numeric.

Regards,

Henrique.

Former Member
0 Kudos

use the 'formatNum' function to achieve this....

the parameter of this function need tobe set as '0000000000'...

Thanks,

Renjith

Former Member
0 Kudos

Why dont you use concat function with '00000' + inputfiled and map it to output.

--Sudha Madhuri

Former Member
0 Kudos

I don't know the input value. It can be 4 digit, 3 digit or can contain some chars also- in that case I don't have add laeding zeros.