Formating a number display

D

Damaris

Hi guys, I create a form that are published on a Share Point form library.
Each form needs to have a sequential number with 04 digits, for example:

1st doc: DOC0001
2nd doc: DOC0002
3rd doc: DOC0003
....

I already have this sequential number using the function " count(@ID) + 1" ,
where ID is a query of the indentification number on the form library.

Now I need format these number that apears as 1, 2, 3 to apears as 0001,
0002, 0003...

Someone have any suggestion?

Thanks,
 
G

Greg Collins [InfoPath MVP]

Use the format-number() function:

format-number(count(@ID) + 1, "0000")
 
Top