Skip to main content
Solved

Counter from 01 not from 1

  • October 19, 2016
  • 7 replies
  • 89 views

franco69
Contributor
Forum|alt.badge.img+8

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

Best answer by takashi

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

takashi
Celebrity
  • Best Answer
  • October 19, 2016

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


franco69
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • October 19, 2016

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

 

perfect...thx

 


srg
Forum|alt.badge.img+10
  • October 19, 2016

If you need them as string use 02s


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • October 19, 2016

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.


itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • October 19, 2016

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


takashi
Celebrity
  • October 19, 2016

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.

itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • October 20, 2016
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 !!