User should not able to select same time

G_S
Bronze 3
Bronze 3

Hi 

 

I am building a room booking application 

I am having following columns

Start time and End time as time column 

Date as Date Column

Room as ref of Room table

What i am expecting is i am booking a room for Today date and Start time - 9.00 am and End time -10.00 am 

Other users should not able to book the same room with same start time and end time 

Please suggest how to achieve this 

 

0 1 33
1 REPLY 1

Try the following as a Valid If on the Room field

isblank(
  filter(
    "Room Bookings",
    AND(
      ([_THIS] = [Room]),
      ([_THISROW].[Start time] >= [Start time]),
      ([_THISROW].[End time] <= [End time])
    )
  )
  - list([_THISROW])
)
Top Labels in this Space