Hello Everybody,
I’m currently implementing a ConfiForms-based booking system using a datetimeinterval
field (datum
) and a checkbox_group
field (Geraete
) to allow users to book one or more devices for a selected time period.
What I’ve achieved so far:
I successfully implemented the validation logic described in the official documentation to prevent overlapping bookings.
datum.startDate: <= [entry.datum.endDate] AND
datum.endDate: >= [entry.datum.startDate] AND
!id:[entry.id]
This correctly prevents overlapping bookings across all records.
My problem:
This rule currently blocks any overlapping booking, regardless of which device is selected. But I want the validation to apply only if the same device is already booked during the selected time range.
For example:
If Waffle Iron is already booked from 12:00 to 14:00, users should not be able to book Waffle Iron again in that time.
But they should still be able to book Grill or Sound System during the same time.
My goal:
To build a validation rule that only checks for time overlap when at least one selected device in the new record matches a device already booked in the same time interval.
Thanks a Lot
Enrico
This will validate the whole booking, no matter what you have selected in the "checkbox group field"...
I would strongly suggest to switch to a dropdown to be able to select just one item for booking. This will make the booking logic a lot simpler than trying to figure out how to make this work for the multi-selects
Unless of course you have a predictable and low number of items in the checkbox group and you can add the very same validation rule, but that includes a condition to check the specific item in the checkbox group (so separate rule for each items in the checkbox group)
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.