Several people have asked for assistance for this feature.
This is not something that InfoPath can do by itself but it can be done with
script.
If you are using a data base to store your data, then it can generate the
number for you.
Otherwise, you will need to create a seperate xml file with just the invoice
number.
Using script, you will open that file, increment the number and then save
it.
The script then puts that number into your Invoice Number field.
You also need to code for situations where the file is already open by
another user, server connections are lost between open and close, etc.
If you just need unique numbers and they don't have to be sequential, you
can build a number from the date and time and the users ID number. This
would give you something like 00195301040927 = 001 9:53:01 04/09/27.
These will be very close to sequential. You will be able to sort by date,
etc.
--
Jerry Thomas[MSFT]
<
[email protected]>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.