web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Book a room template - adding message/meeting details

(0) ShareShare
ReportReport
Posted on by 94

Hi, I have successfully followed this guide to add attendees to a meeting booking (using VarAttendees variable)...

https://powerusers.microsoft.com/t5/Building-Power-Apps/sending-invites-in-Book-a-room-app-template/td-p/438176

 

What I'm hoping to do next is add a message to go with the meeting request.

 

I have created a Subject text input box called "inputSubject" and a Message text input box called "inputBody" which are on the RoomSelect screen.

 

I just can't figure out where to add these in exactly. I think it goes into the OnVisible property of the Confirmation Screen maybe? (see below)

 

If(
IsBooking,
UpdateContext({ShowLoading: true});
Set(AvailableRoomsCounter, 1);
If(
!BookForMeeting,
Office365.V2CalendarPostItem(
MyCalendar,
User().FullName & "'s Booking",
StartDateTimeUTC,
EndDateTimeUTC,
{
RequiredAttendees: RoomsGallery.Selected.Email & ";" & VarAttendees,
Location: RoomsGallery.Selected.Name,
Importance: "Normal",
ShowAs: "Busy"
}
),
ClearCollect(
RequiredAttendeesNoRoom,
Split(
MeetingsGallery.Selected.RequiredAttendees,
";"
)
);
ForAll(
AllRooms,
RemoveIf(
RequiredAttendeesNoRoom,
Address = Result
)
);
ClearCollect(
RequiredAttendeesNoRoom,
Concat(
RequiredAttendeesNoRoom,
Result & ";"
)
);
ClearCollect(
RequiredAttendeesNoRoom,
Split(
First(RequiredAttendeesNoRoom).Value,
";;"
)
);
Set(
RequiredAttendeesFinal,
First(RequiredAttendeesNoRoom).Result
);
Set(
RequiredAttendeesTrue,
RoomsGallery.Selected.Email & ";" & RequiredAttendeesFinal
);
Office365.V2CalendarPatchItem(
MyCalendar,
MeetingsGallery.Selected.Id,
If(
MeetingsGallery.Selected.Subject = User().FullName & "'s Skype Meeting",
User().FullName & "'s Booking",
MeetingsGallery.Selected.Subject
),
StartDateTimeUTC,
EndDateTimeUTC,
{
RequiredAttendees: RequiredAttendeesTrue & ";" & VarAttendees,
OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees,
Body: "Room has been updated to " & RoomsGallery.Selected.Name,
Location: RoomsGallery.Selected.Name,
Importance: "Normal",
ShowAs: "Busy"
}
)
);
UpdateContext({ShowLoading: false})
);
Set(
IsBooking,
false
)

 

Any help would be greatly appreciated.

 

Thanks,

Rob

I have the same question (0)
  • RobChilds Profile Picture
    94 on at
    Re: Book a room template - adding message/meeting details

    I managed to figure this out thankfully through looking into the Office365.V2CalendarPatchItem and using the hint text that appears at the top. This lists the order it is expecting values, and what each part does. 

  • seanyee Profile Picture
    21 on at
    Re: Book a room template - adding message/meeting details

    do you mind share the code/solution here, i currently building the same thing and having headache all over internet for solution.

  • seanyee Profile Picture
    21 on at
    Re: Book a room template - adding message/meeting details

    do you mind share the code/solution here, i currently building the same thing and having headache all over internet for solution.

  • RobChilds Profile Picture
    94 on at
    Re: Book a room template - adding message/meeting details

    Sure, see below. I made a mistake in my post above, it wasn't the CalendarPatch item but CalendarPost item. Anyway here you go hope it helps...

     

    If(
    IsBooking,
    UpdateContext({ShowLoading: true});
    Set(
    AvailableRoomsCounter,
    1
    );
    If(
    !BookForMeeting,
    Office365.V2CalendarPostItem(
    MyCalendar,
    inputSubject,
    StartDateTimeUTC,
    EndDateTimeUTC,
    {
    RequiredAttendees: RoomsGallery.Selected.Email & ";" & VarAttendees,
    Body: inputBody.Text,
    Location: RoomsGallery.Selected.Name,
    Importance: "Normal",
    ShowAs: "Busy"
    }
    ),
    ClearCollect(
    RequiredAttendeesNoRoom,
    Split(
    MeetingsGallery.Selected.RequiredAttendees,
    ";"
    )
    );
    ForAll(
    AllRooms,
    RemoveIf(
    RequiredAttendeesNoRoom,
    Address = Result
    )
    );
    ClearCollect(
    RequiredAttendeesNoRoom,
    Concat(
    RequiredAttendeesNoRoom,
    Result & ";"
    )
    );
    ClearCollect(
    RequiredAttendeesNoRoom,
    Split(
    First(RequiredAttendeesNoRoom).Value,
    ";;"
    )
    );
    Set(
    RequiredAttendeesFinal,
    First(RequiredAttendeesNoRoom).Result
    );
    Set(
    RequiredAttendeesTrue,
    RoomsGallery.Selected.Email & ";" & RequiredAttendeesFinal
    );
    Office365.V2CalendarPatchItem(
    MyCalendar,
    MeetingsGallery.Selected.Id,
    If(
    MeetingsGallery.Selected.Subject = User().FullName & "'s Skype Meeting",
    User().FullName & "'s Booking",
    MeetingsGallery.Selected.Subject
    ),
    StartDateTimeUTC,
    EndDateTimeUTC,
    {
    RequiredAttendees: RequiredAttendeesTrue & ";" & VarAttendees,
    OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees,
    Body: "Room has been updated to " & RoomsGallery.Selected.Name,
    Location: RoomsGallery.Selected.Name,
    Importance: "Normal",
    ShowAs: "Busy"
    }
    )
    );
    UpdateContext({ShowLoading: false})
    );
    Set(
    IsBooking,
    false
    )

  • seanyee Profile Picture
    21 on at
    Re: Book a room template - adding message/meeting details

    Thanks, i managed to figure myself as well.

  • minhhoangn Profile Picture
    40 on at
    Re: Book a room template - adding message/meeting details

    This is my customize code with 2 inputText, txttitle.Text and 

    txtdescription.Text
    minhhoangn_1-1721036481578.png

     

    minhhoangn_0-1721036382214.png

    If(IsBooking,
     UpdateContext({ShowLoading: true});
     If(!BookForMeeting,
     Office365.V2CalendarPostItem(MyCalendar, txttitle.Text, StartDateTimeUTC, EndDateTimeUTC, 
     {RequiredAttendees:RoomsGallery.Selected.Email, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy", Body: txtdescription.Text}),
     
     ClearCollect(RequiredAttendeesNoRoom, ForAll(Split(MeetingsGallery.Selected.RequiredAttendees, ";"), {Result: ThisRecord.Value}));
     ForAll(AllRooms, RemoveIf(RequiredAttendeesNoRoom, Address = Result));
     ClearCollect(RequiredAttendeesNoRoom, Concat(RequiredAttendeesNoRoom, Result & ";"));
     ClearCollect(RequiredAttendeesNoRoom, ForAll(Split(First(RequiredAttendeesNoRoom).Value, ";;"), {Result: ThisRecord.Value}));
     Set(RequiredAttendeesFinal, First(RequiredAttendeesNoRoom).Result);
     Set(RequiredAttendeesTrue, RoomsGallery.Selected.Email & ";" & RequiredAttendeesFinal);
     Office365.V2CalendarPatchItem(MyCalendar, MeetingsGallery.Selected.Id, If(MeetingsGallery.Selected.Subject = User().FullName & "'s Skype Meeting", User().FullName & "'s Booking", MeetingsGallery.Selected.Subject), StartDateTimeUTC, EndDateTimeUTC, {RequiredAttendees: RequiredAttendeesTrue, OptionalAttendees: MeetingsGallery.Selected.OptionalAttendees, Body: "Room has been updated to " & RoomsGallery.Selected.Name, Location: RoomsGallery.Selected.Name, Importance: "Normal", ShowAs: "Busy"})
     );
    
     UpdateContext({ShowLoading: false})
    );
    Set(IsBooking, false)

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 803 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 314 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 253 Super User 2025 Season 2

Last 30 days Overall leaderboard