Skip to main content
Hi,
I have an attribute by the number 0821 and similar which I want to add next to another counter attribute that starts on 01 and goes on 02, 03 etc. My attrbute KnKod_1 looses the leading 0 to the left.
See expression in Arithmetic ed. in the pic.

_ProjectID_Test2 should have:

082101

On the first row there.


This can be done with the function @PadLeft(<string>,<padLength>) or the StringPadder transformer.


Does not seem to work, I added it around just the first @PadLeft(@Value(KnKod_1),1) and also around the whole expression. No errors and no difference in the attribute.

image


Ok, StringPadder transformer worked better :)

 


Does not seem to work, I added it around just the first @PadLeft(@Value(KnKod_1),1) and also around the whole expression. No errors and no difference in the attribute.

image

It should be 

@PadLeft(@Value(KnKod_1),6,0)

where '6' is the number of characters you want to have and '0' is the character you want to use.


Reply