Automatic number in field

Hi,

We use a form for travel expenses, to identify each form we input our travel expenses we want it to generate a automatic number each time we open the form like 30000, 30001 and so on. Best example I can think of is that we would like it to be like an invoice number.

Thanks,

Aage

Subject: has been discussed many times in this forum

There are hundreds of postings about this. Basically, you have to do it one of two ways:

  1. If you have a central server-based application (no replicas), then you can create an indexed view based on the number, and simply increment it by 1 each time.

  2. But, if you have multiple replicas, there is no way to do this. You should add some sort of prefix based on the user’s name (for example 30001WN for me). Then if two people are creating numbers simultaneously, they will still be different.

Subject: Ok!

Ok, thanks!