Prevent Save Data At the same time

Hi

I’m testing the token system. After the user is login, they have to get token to see the doctor.

So, I set the token field to number and in Popup input, initial content to last token+1.

There is a problem when 2 or more user press the “Get Token” at the same time, they got the same token number.
I was hoping to provide the token as serial.

How do I prevent to user not to click at the same time.

Do the tokens need to be sequential? If not, could you generate a unique and random number by running a calculation on the user’s unique ID but factoring in the current time as well (which would make sure the same user would get another unique token at a later time)

1 Like

Thank you for your respond @msgiblin

Yes, token need sequential.

Similar as voucher syste. When employee report, it need voucher serial. Employee enter the voucher information and save. After that, system will generate voucher serial number. Employee will write the code on the voucher and take the bookkeeping process.

It is same story as token. When two or three employee hit the save button at the same time, They all get the same serial number. It cannot proceed the bookkeeping process because of same voucher number.

Currently, I’m fixing as below.

Create the Repeating Group and produce the Current Cell Index as voucher serial and save with workflow. This method is currently working. But, I think it may consume unnecessary system resource.

I would like to know better way.

Thank you.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.