I am trying to recreate @Robert_Petitto’s Meet with Me app, with buffer and meeting duration pre-selected.
As part of the slots availability check, I am subtracting 2 dates expressed as numbers (Robert - here’s a hint for you to add/subtract dates in Glide ).
Imagine: I am trying to book a 30 min slot for 03:30 when 04:00 is already booked.
In the 4th row in the screenshot below, the result is 0 (which is correct).
It is the result of: new booking slot end time (04:00) - existing booking’s start time (04:00).
In the dependent IF condition, I am checking for this difference to be >0.
The result is 0.0000 but the IF condition evaluates to 1.
I suspect that there is one rogue field which is not constrained with precision to 4 digits.
This may not be a bug after all, but an extreme corner case of a math result greater than 0.0000.
I noticed this with other scenarios as well. You can add a go-between template column that converts the math column to a string and then evaluate 0s and 1s that way. If this works…you’ll need to show me!
Haha, Robert. I have spent the last 24 hours trying to figure this out (that one bug that doesn’t let you sleep).
I designed a simpler app with no preselected meeting duration (e.g. as a result of which you could book a 60 minutes meeting at 03:30, even if 04:00 is booked). I struggled with something similar there too, until I figured that Precision is the culprit. That app works perfectly, with configuration for buffer between meetings too.
I was planning on sharing this app with you once this app was bug-free.
But this ‘bug’ is stopping me from making the announcement. :-/
Sorta got this working. The trick was actually to use two relations (one for start times not matching) and the other for starttime + durations not matching. I used values and I see what you were talking about about the precision. So what I did was use a text formula to crop off the values past “00000.0000” for both the selected datetime as well as the unavailable datetimes:
Here’s the result. Only SOME slight lag when first selecting/matching date times w/ duration. …but NO lag when selecting other durations:
Robert, I don’t know if you have seen Jeffs booking form on his concepts app. I noticed that it prevents time conflict by service provider. Only problem was I could not get, as he could for whatever strange reason, the sheet to record the entries even though it displays then on the calendar display on the app. Because of this I am approaching things in a differing manner inside the Glide editor and got rid of all Jeffs formulae. But it’s works for me because mine is based on a weekly/monthly basis beyond which I am asking customers to book using the booking form based on subject to availability. I’ll share the final product once I’ve finished.
Yours of course is a proper booking app. Mine is just a workaround that avoids use of google formulae altogether.
You should’ve been able to book a 45 min meeting at 10:15. This is one of the edge cases.
Also, the lag was the reason why I wanted to do everything in Glide’s Builder. Except for the ‘desired date’ nothing is being communicated back to the app.
Others testing the app: the app is broken now. I tried changing the format for the desired date in my app and it is not getting carried over int he right format. Will fix it when I feel fresh.
Oh my goodness…I’m SO close. All I need to do is somehow get my date picker to write the datevalue (as a number) in Glide…thought maybe writing the date picker to a num column would work but it writes 0.0000 instead. Tried formatting my spreadsheet to be a number in 00000.0000 format and it works until I pick a new date…overwrites the format.
Only thing I can think of is use choice components to write the month value and day value separately and “math” them together to create the datevalue. Wish the date/time column had a “value” display.
numeric start datetime+duration value (my value + duration -> template column) matching the array other other start datetime values durations (missing the start edge value)
Would be a heckuva lot easier if we could just have datevalue to start with…but it was fun figuring it out.
The pitfalls is that it will only work for English/American Time format…currently only works for 2020 and 2021…unless I put in a few minutes work to add the next decade or so.
It should be sufficient to format the whole date/time column in Google Sheets as a number. Then next time you let Glide write a date/time to that column, it should honor that format.
It doesn’t. When I write to that column, Google sheets switches the Date value back to timestamp which Glide then interprets as date/time column which means I can’t do calculations.