I'm building a scheduler to sign out items. Right now a customer can select a range of dates, those dates get stored to varStartDate and varEndDate respectively. The next page will show available items during that date range, and should not show items already scheduled. My current code works for the most part, except I found it can double book under the right circumstances.
I followed April Dunnams video Here and tailored it for my needs. She did post a follow-up
video not long ago about fixing the double booking, however she did not explain how and I can not download her app to compare.
Double booking example:
I have Item #1 reserved for 5/8/2023 through 5/12/2023
When selecting dates 5/8/2023 through 5/13/2023 Item #1 will not show up.
When selecting dates 5/9/2023 through 5/13/2023 Item #1 DOES show up.
Filter('mydatalist',Not(Title in Filter('mydatalist', 'Pickup Date' >= varStartDate && 'Return Date' <= varEndDate || 'Pickup Date' <= varEndDate && 'Return Date' >= varEndDate).'itemrequested'))
I've tried figuring out the >=< filters but I think at this point I've tried so many I'm just running in circles.