Auto Number Duplicating Numbers

Posted by Rollbase User on 04-Aug-2010 17:22

Auto Number - When I enable Auto Number for a customer account for example it populates the same number if two or more people are creating a new customer at the same time. is there a way to generate auto number for Account at the time the customer is being saved instead of when the user is creating it?

All Replies

Posted by Admin on 04-Aug-2010 17:49

Good question. Autonumber fields should automatically have the "Do not allow duplicate values" property enabled. When the second user clicks Save, all data will not be lost but an error will be displayed telling them that the value is already in use. This is a very rare case but is handled by the system. Let me know if you experience something unexpected.

Posted by Admin on 04-Aug-2010 18:29

Matt, thank your for your quick reply... I understand your answer, but that enables the user to change the auto number field. Can we make it so that the number is generated at the time the user saves the record?

Maybe I'm doing something wrong. How would you assign account numbers to vendors or customers in your system. keeping in mind that multiple users may be creating them at the same time.

Posted by Admin on 04-Aug-2010 18:55

No your approach is OK. But Autonumbers don't work that way (they are generated as soon as you open the "New" page)

If you want a number or sequence to be generated when the record is saved, the best thing to do is use a different field type, and use a Trigger of type "Update field value" to update that record 'After Create'. This way you can programmatically define the value yourself.

Hope this helps,
Matt

Posted by Admin on 04-Aug-2010 19:54

Please excuse my ignorance. Can you please elaborate. I am new to rollbase.

Posted by Admin on 04-Aug-2010 20:03

I recommend experimenting and reading up on Triggers (documentation is available here: http://www.rollbase.com/support.html?pcURL=support/rollbaseInAction.html)

Good luck!!

Posted by Admin on 09-Jul-2012 20:24

Hello all,



I've encountered the same issue in duplicating numbers. Just want to ask the following:



1. Are there new enhancements in the autonumber fields using the latest engine?

2. Does the issue regarding duplicating autonumbers still exist?

Posted by Admin on 12-Jul-2012 02:25

If I use trigger, wouldn't it defeat the purpose of autonumber fields?

Posted by Admin on 19-Nov-2012 21:39

Godfrey, We believe this has been addressed in the 3.8.7 release on November 17th.



Regards,

Matt

Posted by Admin on 23-Nov-2012 02:13

Thanks! :)

This thread is closed