How do I create a auto number field on a form?

P

Pieter

I want to use Infopath to create Field Tickets. I need to generate a
sequential number automatically everytime I fill out a new form.
 
J

Jerry Thomas [MSFT]

Search this Newsgroup for earlier information but here's a quick recap.

Create a seperate file with just the ticket number.
Using script, open the file, increment the number then save and close the
file.
Don't forget to include code for issues such as retries when the file is
busy.

You can get unique, sequential numbers using a combination of users ID and a
date and time stamp, but that probably wouldn't be a good option for ticket
numbers.
--
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.
 
C

Chad Manzer

Why not Use the XPath generate-id() to create a Unique ID on first open the
store it to what ever data source your using...

Jerry Thomas said:
Search this Newsgroup for earlier information but here's a quick recap.

Create a seperate file with just the ticket number.
Using script, open the file, increment the number then save and close the
file.
Don't forget to include code for issues such as retries when the file is
busy.

You can get unique, sequential numbers using a combination of users ID and a
date and time stamp, but that probably wouldn't be a good option for ticket
numbers.
--
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.


Pieter said:
I want to use Infopath to create Field Tickets. I need to generate a
sequential number automatically everytime I fill out a new form.
 
S

Steve van Dongen [MSFT]

Why not Use the XPath generate-id() to create a Unique ID on first open the
store it to what ever data source your using...

First, that generates a string of random alphanumeric characters, not
a sequential number. Second, there's no way to store the value.

Regards,
Steve
 
A

advanceduser

One way is to use store your unique counter in a file and increment i
after setting ur ticket number in infopath form and save it back. Fo
this you need to open file in your infopath everytime new form i
created


-
advanceduse
 
D

Dirk

Dear deers !

I got a hint, but I do not know how to program the autonumber field. Do you
have scrip in .net 2003 for example ?

Merry christmas.
 

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