Hi!
I am making an app to get an overview of the users who have booked the meeting rooms in my department.
Because there are so many ways to book rooms in Outlook, the syntax has to account for solutions where the user who book can end up being both the organizer for the event, but also just a required attendee.
Likewise, the meeting room might sometimes be an organizer, and at other times a resource attendee, an optional attendee, or a required attendee.
I have made an if-statement with two different alls to the Office 365 Users-connection, based on whether the user is the organizer or an attendee. However, the If-statement runs both calls, and since only one of them will ever be true at any time, I get a 404 error.
Any ideas on how to make it so that the code skips the call that doesn't match the inital check? Or, any other tips on how to make this work? I feel like the solution is probably simple, but I am just so lost on this one 😅
If(
//Checks if there is a reservation on the meeting room. If yes, returns photo, if no, returns icon showing free
IsEmpty(Search(colEvents,"MeetingRoom","organizer","optionalAttendees","requiredAttendees","resourceAttendees")),
//If the meeting room is not organizer, looks up user as organizer
If(
IsBlank(LookUp(colEvents,"MeetingRoom" in organizer)),
'Office365-brukere'.UserPhotoV2(
LookUp(colEvents,"MeetingRoom" in resourceAttendees Or organizer Or optionalAttendees,organizer)),
//If meeting room is organizer, looks up user from Required Attendees, and cleans string
'Office365-brukere'.UserPhotoV2(
Left(LookUp(colEvents,"MeetingRoom" in organizer,requiredAttendees),
Len(LookUp(colEvents,"MeetingRoom" in organizer,requiredAttendees))-1))),
//If no, show space as free
ledig_ico)
Any tips would be very welcome!