Should not be able to select same time for any date twice. How to do it?

OK Let’s do this @Piyush_Patil , lot of steps, I tried to be clear. Embed doc at the end but please read this to understand the process mate :wink:

BONUS 1
First of all, this is not sexy to have several times the same date in your lookup option, then I implemented this solution How to get Lookup columns to display only unique values?, so that you have unique value of date in your Pinterest table

Your Issue

We can indeed unauthorize you to select a time that has already been selected for the same day. Bonus 2 : if every hour of a given date has been selected, I wont let you select this day anymore (see below)

  • First step is to create a “date & time” column in your pinterest database, we’ll use that to compare in the “Date & Time” Table

  • Same in the date & time table

  • Then, we want to know in the date & time table if the combination of date/time has already been taken in pinterest table, create a checkbox with this formula

  • Back to pinterest table, set the time as “lookup”, and customize it to filter only time of current date, and corresponding to combination not already taken

  • So, in November 2nd, I have 3 possibilities in date and time : 1,2 or 3 PM. As 1 PM is already selected, checkbox is true, then in Pinterest table you cant select 1 PM any more. That’s the job you want !

Bonus 2
If all possible time of a given date have been taken, you’d like not to be able to select this date in the pinterest table

  • Create a “AllDayTaken” in date and time table, With this formula. It will run through every row of this date, and check if the time as been taken. If all of them are, the checkbox goes true. It means that there is no other time available for this date

  • Back to pinterest table, custom your date lookup filter to unauthorize row with AllDayTaken true

And you cannot chose Nov 2nd anymore !!

Conclusion
Yes, you have to deal with a second table of date/time, but this is I think the better way to proceed complex filter on date & time. But you can create easily this table as long as you want with button using ForEach/Sequence Button

Embed Doc

3 Likes