Hi guys,
First off, I'm fairly new with using PowerApps so in case this is a dumb question... please bare with me. One of our customers asked me if it's possible to create an app from where the employees can book desks at the office. They would like to use it during this ongoing Covid crisis. I've managed to design the 'Book a room' PowerApp for most of their needs.
I've figured out how to filter which rooms (desks) should be available for bookings. What I can't figure out if the following. In stead of letting the employees choose their own 30 min time-slots I'd like to set it up so that they automatically book desks from 08:00am to 18:00pm. So basicly the employee can only book a desk for a full day.
I suppose I have to set this up under the 'Landingscreen --> ButtonNoMeeting' code but do not know how to do so. I've filtered out the 'ButtonMeeting' by the way.
The default code looks like this:
Set(DateSelected; Today());;
Set(DateTimeRoomChange; true);;
If(Mod(Minute(Now()); 30) <= 14;
Set(StartDateTime; DateAdd(Now(); -Mod(Minute(Now()); 30); Minutes));;
Set(EndDateTime; DateAdd(StartDateTime; 30; Minutes));
Mod(Minute(Now()); 30) >= 15;
Set(StartDateTime; DateAdd(Now(); -Mod(Minute(Now()); 30) + 0; Minutes));;
Set(EndDateTime; DateAdd(StartDateTime; 30; Minutes));
Set(StartDateTime; Now());;
Set(EndDateTime; DateAdd(Now(); -Mod(Minute(Now()); 30) + 0; Minutes))
);;
Set(StartDateTimeUTC; Text(DateAdd(StartDateTime; TimeZoneOffset(); Minutes); "[$-en-US]yyyy-mm-ddThh:mm") & ":00.000Z");;
Set(EndDateTimeUTC; Text(DateAdd(EndDateTime; TimeZoneOffset(); Minutes); "[$-en-US]yyyy-mm-ddThh:mm") & ":00.000Z");;
Set(BookForMeeting; false);;
If(NoRoomsList;
Navigate(RoomSelectScreen; Cover);
Navigate(RoomListSelectScreen; Cover)
)
Any help on how to edit this would be greatly appreciated.
Thanks in advance.
Andy