cancel
Showing results for 
Search instead for 
Did you mean: 

Default leading zeros during loading

siowfong_chen
Contributor
0 Kudos

Hi! I have part numbers that tend to have varying length and I have a requirement to put leading zeros before them when I load the catalog data via Import Manager. The Replace function would not work for this as the number of leading zeros is not fixed. Does anyone know o a way to do that?

Cheers!

SF

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Have a look at the below approach

Assumption- Max Part Number length would be 10 digits.

Create one Assignment with expression

Mid(10000000000+PartNumber,2,10)

Expression will first add the PartNumber with 1000000000 then using Mid function it will extract the desired result.

E.g.

PartNumber = 3030

1000000000+3030 = 10000003030

After Mid = 0000003030

Create one workflow with the Assign step and use the assignment created above. Launch this workflow on Record Import.

I tried this and its working fine.

Regards,

Jitesh Talreja

siowfong_chen
Contributor
0 Kudos

That's an excellent solution! Thanks very much Jitesh.

Regards

SF

Answers (0)