AutoNumber Use Case

Hi, We have use case where we have multiple stores (more than 1000) and each store has many branches and each branch creates many Job order. We need unique sequencial JOB id for each job order for that branch. so ew can have sequencial id for every branch. Store 1 → Branch 1 → user 1 → Unique ID (Store1+Branch1+1)                                                     → Unique ID (Store1+Branch1+2)                                         user 2 → Unique ID (Store1+Branch1+3)   Above logic would be applicable for n number of stores and n number of branches. All will be storing in one table but sequence should be maintained branchwise . I am thinking to have solution to retrieve the last latest object for that branch and increment  by 1. But what happens if there are multiple request from same branch? To avoid this problem, am trying to use synch on MF which will put parallel request in queue. Since I have more than  10000 stores and more than 1000 branches for each store. As I mentioned we are using only one table for those id for all store and branches. will synch creates the performance issue. OR any other alternate solution for such scenario.   Thanks, Amol  
1 answers

If the idea is to create an ordering of the jobs, so the sequence range can have holes in the range you can use an autonumber attribute.

The use this attribute to combine this with the store and branch to create the complete id.

This will not cause issues with concurrency, but does allow for numbers to be missed as the numbers are claimed on the create of the request and if the user decides not to commit the request the number is lost.

But as I said if the idea is to create a unique number that is used for sorting/ordering of the records this will work fine.