Skip to main content

An easy one I think,

I want to have an attribute which comes out from counter which starts with 01 not with 1...so I set this in my count start param (01) but it didn't change anything!? it starts at 1

Any solutions?

Greetz

Franco

Hi @franco69, you can convert 1, 2, 3 ... to 01, 02, 03 ... with the StringFormatter. Try this.


Hi @franco69, you can convert 1, 2, 3 ... to 01, 02, 03 ... with the StringFormatter. Try this.

 

perfect...thx

 


If you need them as string use 02s


still wo'nt have it count in strings though..so no string exiting the counter.

cause it can't.

..or does it?

Funny, because the counter does output it as a srting, wether u start at 1 or 01.

You just can't have it done formatted with leading zeroes i guess.

Check it out in the feature information window.


You could do it in one transformer (AttributeManager) unfortunatly not within one go...


You could do it in one transformer (AttributeManager) unfortunatly not within one go...

0684Q00000ArKK6QAN.png

a single expression should also be possible. e.g.

 

@PadLeft(@Count(counter,1),2,0)
or

 

@Format(%02d,@Count(counter,1))
etc.
a single expression should also be possible. e.g.

 

@PadLeft(@Count(counter,1),2,0)
or

 

@Format(%02d,@Count(counter,1))
etc.
Yes, seem to have missed out on the % sign. Nice one !!

 

 


Reply