Home

Cardbox Talk

 

CardboxForumsCardbox Talk > "Automatic numbering"

Automatic numbering

Current user: [none]
Register / Log In · Help

Posted By Post

langner

31-Aug-2010 08:30

We introduced a long time ago in out template an automatic numbering.
How does it work? We believed in the fact that there is always a new number but we found sometimes five times the same number?

bert

31-Aug-2010 09:25

I'me sorry to say: I experienced this too years ago.
This seems to happen under some circumstances that change the next number to a certain value (mostly already used) number.
We have try to find how and when this happens: however no success yet.

I advice to add after validator "automatic number", to add validator "Unique Term".
If automatic number goes wrong, there is second check to prevent errors. You are warned then.

Regards
Bert

cardboss

31-Aug-2010 10:22

The only way to get two records with the same number is to take an existing record, duplicate it, and save the duplicate.

If you want to duplicate a record but give it a new number, then erase the existing number before you save the duplicate record: Cardbox will then allocate a new number.

bert

31-Aug-2010 11:23

The field with the automatic number validator is in case of duplicate record automatically erased.
It is not possible to erase it...!

The new number is generated when a record is saved.

Regards
Bert

Charles Welling

31-Aug-2010 11:47

I've used automatic numbering for many years and it's a very robust mechanism. By the way, Bert's right: when a record is duplicated the existing automatic number is erased and that's the way it should be! In earlier builds users could erase or overwrite automatic numbers and it was not possible to make the field read-only. So, in the old days duplicate numbers were quite easy to make. However, this was changed a long time ago. Automatic fields could be made read-only and still receive the automatic number from the system. Again, that's the way it should be because automatic numbering is useless when users can make up their own numbers.

There is however still a way to enter duplicate numbers. When records are imported, either from a window or a file, and the new records contain numbers that are read into an automatic field then these numbers are accepted.

There are circumstances that this is acceptable or even desirable, but it may lead to errors. Perhaps Cardbox should warn a user when he tries to enter data into an automatic field this way and prompt him for the desired action:

a. read and accept the imported data
b. ignore the imported data and add automatic numbers according to the settings in Automatic Numbering

Regards
Charles

Quick Reply

Please log in or register before trying to post a reply.

 
© 2010 Cardbox Software Limited   Home