Please !!! teach me how to protect duplicate data when my users open form on the same time

          I'm just a beginner to use this AppSheet and I figure out the solution to improve my problem for a long time but I still cannot improve it. Please help me.

         My AppSheet is about "Appointment Data" for booking time snd date to send material. I have a problem with "Duplicate Data" When my users, open the form for booking time at the SAME TIME!! . My Appsheet will receive " Duplicated Data " as my picture ( We have 5 Users open the form at The Same time and the system also record duplicated data in the system )

Error.png

           I tried to protect this problem for a long time with many Expressions in AppSheet but still cannot improve it. If you have the best solution or I have to try something else please teach me. I use this AppSheet with my Organization and I cannot achieve my project to use this app completely.

           Please. I cannot find the solution anymore.

Thank you very much.

PS. Picture of My Form for Booking

error 1.png

0 5 344
5 REPLIES 5

One approach you may want to try..

  • Create a shadow table that has the same architecture as your Appointment table
  • Create an action to copy data from the shadow to the main
    • In the behavior's "only if this condition is true", check any duplicates using the data entered in the shadow against the main table.
  • Create a bot to fire the action above on add to the shadow table

My quick test seems to work.

If this works for you, then you need to additionally implement something to notify either success or failure of the creation of an appointment.. Perhaps additional bot on the main to send an email notification..

Perhaps other community members can suggest other approaches.

Thank you very much for your suggestion. I'm going to try it. It seems I have to use Automation but I haven't used this "Automation" before Could you suggest to me how to create this solution. 

https://www.appsheet.com/portfolio/3401559

You can see my test app - 'Minimize Duplicates'

As Steve mentioned, this is not fool proof. So test it extensively before you deploy it!

Steve
Platinum 4
Platinum 4

It is not possible to prevent duplicate bookings entirely--there will always be a chance it can happen. You can reduce the possibility, and you can respond to duplicates, but you can't prevent them entirely.

This is a question of database architecture. When you have a database record that is susceptible to change by concurrent events or user inputs, you should NEVER allow that record to be directly updated by the users (or events). 

Instead, your users (or events),  should submit a Change Request in a separate table, then your app's automation would process these change requests as they come, then either approves the change request and act accordingly, or reject it. That's the way you do it.

This is not limited to AppSheet and it's a rule of thumb that you should follow. 

Top Labels in this Space