Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
6 years ago

Re-asking this Database Lock issue question

This seems to be a database lock issue and I have asked a few days ago and no one has provided a real solution (only temporally fixes).

We created a form using for staff to register for daily available slots. Unfortunately, when we tested the form, we did not test it for concurrent data entry. And lo and behold, when we opened the registration for the event, we found out that when two users were working on the form at the same time, the form rules could not stop them from passing the limit (e.g., if one slot was available two people could sign up for it, provided that when they opened the form to register, one slot was available). Is there a way to fix this so that two people cannot register for the same slot? 

5 Replies

  • One way to overcome that is to setup a unique field requirement for the field. For example the record ID for the slot (if a dropdown) or a concatenated field (date+ time slot) will prevent users from saving a record if two users concurrently opened the form.
  • This sounds like a possible solution but I can't figure out in my head how to set up that unique requirement you mentioned.

    Perhaps I should elaborate as I did before. 

    We have two tables. One table is called Event Dates. The other is Event Registration Request table (the latter is a child of the former). Each event date has a total number of slots that can be requested(one event per day, with a limited number of slots available represented by a numeric field. Slots may be added if money is available, which means I can edit the Event Date record and change the number of available slots) . One user can request more than 1 slot on a certain date provided that the slots are still available. We created a formula field that calculates slots still available for each day. We have a rule set to abort the save and display a message indicating that the "Number of requested slots is greater than the number of slots available for this date". The form works fine if I go in the form and try to request 2 slots when only 1 is available. But if I and a colleague go in at the same time and request 1 slot each, the form can't stop us.
  • 1. Send an email when the course is I subscribed and tell the user they were too slow to save.

    2. use an Automation to set the Acceptance Status to �Cancelled due to course over subscribed�.
    • ArchiveUser's avatar
      ArchiveUser
      Qrew Captain
      Sounds good. And perhaps also the automation should actually delete that entry. But  Will the Quickbase know who to pick between the 2 users who initially accessed the record when slots were available? 
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      I would never delete. I would want a record of the rejection.

      It will pick whoever Saved last.