Left Padding a Number?

B

Barry Prentiss

Hi,
Is there a way in InfoPath '03 to left-pad a number with zeros?
I am using a ProjNum generated from a max[@ProjNum] secondary datasource
value.
It is then incorprated into a string formID (i.e. FDS-00123).
How can I pad the number in a concat("FDS-", max[@ProjNum] + 1) call?
Thx,
Barry
 
S

Shiva (GGK Tech)

Hello,

How many zeros you want to add in left side you can directly add those in
you formula,
concat("FDS-00", max[@ProjNum] + 1)

Otherwise you have to do the manipulation of finding the max(@ProjNum] value
and adding the zeros on left side using code. Then use that number in the
above formula.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top