Do not allow user to submit if value already exisits

Hi All,

I am creating a booking system which allows users to book their delivery / pick up. I have a date and time column as well as a bunch of other data inputs like reference numbers and names etc. When the user tries to book their delivery in how can i get appsheet to now allow the user to select the time they want if that time and โ€œdateโ€ is already in the spreadsheet (2 columns). Further to this if it can be done can, i have an enum for times with show every 15 minutes for 24 hours of the day. If that time and date i,e 08/08/2020 7:30am is detected in the spreasheet columns do not show this in the enum - at best do not allow user to input that time (Already booked out)

Thank you

Solved Solved
0 3 256
1 ACCEPTED SOLUTION

Use something like this as your Valid_IF formula:

ISBLANK(
ANY(Select(Tablename[TableID],AND(
[Time]=[_ThisRow].[Time],
[Date]=[_ThisRow].[Date],
[TableID]<>[_ThisRow].[TableID]
)
))
)

Its obviously more complicated if you need to look for overlapping time entries

Simon@1minManager.com

View solution in original post

3 REPLIES 3

So you need your list of every 15 minutes minus a list of all the times that currently have a delivery.
I do this in an app of mine with interview times. I have a prepopulated table that contains every possible interview time per district and my time field is limited to times that donโ€™t already have a candidate.

Use something like this as your Valid_IF formula:

ISBLANK(
ANY(Select(Tablename[TableID],AND(
[Time]=[_ThisRow].[Time],
[Date]=[_ThisRow].[Date],
[TableID]<>[_ThisRow].[TableID]
)
))
)

Its obviously more complicated if you need to look for overlapping time entries

Simon@1minManager.com

Youโ€™re a champion. Works perfectly, thank you very much.

Top Labels in this Space