Problem with Autonumbering & Autosave
Posted on 2003-10-23
I am using this formula in a number field named 'Why_Why_Number' to auto-increment a sequential serial number on my documents.
@If(@IsNewDoc;@Subset(@DbColumn( "" : "NoCache" ; "" : "" ; "(docnumber)" ; 1 );1)+1;Why_Why_Number)
It looks up to a view (docnumber) and increments by 1.The issue is that if 2 people attempt to create documents at the same time, I get 2 documents with the same number.
Is there any way to force the document to save immediately (without disrupting the input validation code I have on the other hundred fields) such that the serial number would be locked in as soon as it was created?