AnsweredAssumed Answered

Duplicate custom serial number

Question asked by disabled_xaviervb on Oct 16, 2014
Latest reply on Oct 21, 2014 by disabled_xaviervb

Dear All,

 

I have a field that creates a specific serial number. It's composed by the date and a number :

2014.10.00001

2014.10.00002

2014.10.00003

...

 

The field is a text field with as options auto-enter, calculated value :

------------------------------

Year & "." &

Right ( "0" & Month ; 2 )

& "." & If ( Count ( DOS_DOS::__id ) > 0 ;

Right ( "00000" & GetAsNumber ( Right ( DOS_DOS::number ; 5 ) ) + 1; 5 ) ; "00001")

-------------------------------

 

The relationship DOS_DOS looks if it finds records with the same Month and Year and sorts them by number.

 

This worked fine for months now but suddenly today my customer had a duplicate... The same number.

 

The 2 records have been created with 8 seconds inbetween.

 

Any solutions how to avoid duplicates here?

 

Thanks

Outcomes