Mendix Calendar Widget

0
Hi, In my application I have a page where I can create rooms. I also use the calendar widget to create events. When an event is made, you have to choose a specific room, where the event will take place. What I want to achieve is that when the chosen room already is used at a certain timeframe, an error message shows up saying: 'this room is already in use at this time'.  How can I achieve this? Nico
asked
2 answers
0

are you asking for a functional or a technical sollution ??

answered
0

Nico,

Assuming your Event has an association to Room, you could create a microflow that accepts an Event, retrieves the associated Room and then retrieves other Events for that Room whose time overlaps with the time of the Event that was passed in.  If there are other Events, you can take the appropriate action (display an error message, remove the association to that room, set the times for the Event to the next available time, etc.)

You could then call this microflow in OnChange events for Room reference selector and StartDateTime and EndDateTime attributes on your Event_NewEdit page.

Hope that helps,

Mike

answered