How to Count? So All users know which is the next number to use.

Discussion created by Bzhu on Aug 30, 2018
Latest reply on Sep 26, 2018 by jbrown

Hello All,

I'm using FMPro 14 advanced in Windows 10.

Currently i'm working on a db to allow users to create file numbers used in the department. Along the way (to ease data entry) I managed to get the next number (sequential number) into the field. I did that with the summary field (max).

This posed the problem when multiple users are creating a new file before one can save it. Hence, if you and I both start entering at the same time, we will both get the same 'next' number.  Undesirable.

So, here is what I can think of:
1: use a commit step somewhere as soon as they got the 'next number'. This way the max summary field can update for the next user to get a new number.  good? bad? suggestion?

2: use a separate field to keep track of the current number. All users will check this number and add one to be used as the new file number. Then update the 'current number' field. good? bad? suggestion?

3: global field? i don't think this will work because global fields are per session per user. good? bad? suggestion?


Thank you for your attention. Happy programming~