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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Delete Calendar Item v...
Power Apps
Answered

Delete Calendar Item via PowerApps

(0) ShareShare
ReportReport
Posted on by 135

Hi All! TLDR: I'm 100% a novice at Power Apps and everything I've done so far has been with the power of Google.

 

That being said, we imported the Desk Booking app template from here and I've been modifying it to create a meeting invitation (successfully) using Shane Young's video. Now I'm struggling to figure out how to cancel the meeting invitation in Outlook when you press the "Cancel" button.

 

I'm appending the Office365Outlook.CalendarDeleteItemV2 connector to "OnSelect" of the "Cancel" button. My problem is that I don't fully understand how to make it look up the specific event that I'm trying to cancel. What I've got so far is:

 

Office365Outlook.CalendarDeleteItemV2(LookUp(Office365Outlook.CalendarGetTables().value,DisplayName = "Calendar").Name,event)

 

It's looking up the correct calendar, but doesn't know what event to cancel. My Google powers are failing me on finding a tutorial or information on how to properly use the CalendarDeleteItemV2 to find the correct event.

 

My apologies if I'm not using the right phrasing on this, I'm 1.5 weeks into using Power Apps and trying to "figure it out." Any help would be appreciated!

Categories:
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi,

    You can Use Like that.

    Office365.CalendarDeleteItemV2(Dropdown1.Selected.id, ThisItem.Id);

    In Place of DropDown, you can Pass Your Properties or you can use your logic.

    But for Remove the Meeting required Name and ID.

    For reference, you can have a look into the below URL.
    https://powerusers.microsoft.com/t5/Building-Power-Apps/Delete-Cancel-Meeting-Room/td-p/364201

    Hope this solution helps you to resolve your issue.

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Smilee279 Profile Picture
    135 on at

    So, let me break this down to where I'm stuck:

     

    Office365.CalendarDeleteItemV2(Dropdown1.Selected.id, ThisItem.Id);

    For the underlined part, I planned to use  

    (LookUp(Office365Outlook.CalendarGetTables().value,DisplayName = "Calendar").Name

    For the below underlined part "ThisItem.Id" is where I'm struggling.

    Office365.CalendarDeleteItemV2(Dropdown1.Selected.id, ThisItem.Id);

    If I put in "ThisItem.ID" or "ThisItem.Identity" the app errors out--I'm guessing because it's not calling the correct Outlook event.

    Here's what the code looks like:

    Select( Parent );
    Remove('Desk Reservations',ThisItem);
    Office365Outlook.CalendarDeleteItemV2
     (LookUp(Office365Outlook.CalendarGetTables().value,DisplayName="Calendar").Name,ThisItem.ID)

    I've attached the error message I get.  

     

    error.JPG
  • Vijay Tailor Profile Picture
    2,961 on at

    Hi,

    As per the below comments.

     

    I tested and Mode few changes.

    Please Use

    Below Code for Delete the Events/Meeting Like below.

    Set(CalendarDatails,LookUp(Office365Outlook.CalendarGetTables().value,DisplayName=ComboBox4.Selected.DisplayName));

    Office365Outlook.CalendarDeleteItemV2(CalendarDatails.DisplayName,ThisItem.id);

     

    For getting the Gellary Item you can use like below
    Office365Outlook.V4CalendarGetItems(ComboBox4.Selected.Name).value

    VijayTailor_0-1601017078051.png

     

     

    Thanks,
    Hope this time your issue is resolved.

    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

    Please vote for my idea if you feel, that will help you in the future or good to have in power app.
    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Ability-s-to-Select-Icon-from-UIFabric/idi-p/694921

    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/Preview-Mode-for-All-the-Device-Like-Phone-Tablet-Vertical/idi-p/694891






  • Smilee279 Profile Picture
    135 on at

    Unfortunately, those suggestions didn't work, either.  I'm thinking about attacking this from a different angle and having it save the eventID to Sharepoint when it creates the meeting invite.  Then when sending the cancellation, I can reference the eventID.  Now I just have to figure out how to do all that.... but I think that might be the best route.  

  • BlessedCobba Profile Picture
    459 Super User 2024 Season 1 on at

    I'm going to spin this back up and see if anyone has solved it.

     

    I tried to solve it with a nested gallery. was able to find the calendar ID related to the desk booking, however i was unable to reference the ID in the nested gallery


    Nested Gallery looking up the calendar and fetching the ID that matches the booking

    BlessedCobba_0-1631673474728.png

     

     

    Filter(Office365Outlook.V4CalendarGetItems("Calendar").value, subject = ThisItem.DeskText And startWithTimeZone = ThisItem.CheckOutFrom And endWithTimeZone = ThisItem.CheckOutTo)

     

     

    then the cancel button i have tried to delete the calendar item with

     

     

    Office365Outlook.CalendarDeleteItemV2(LookUp(Office365Outlook.CalendarGetTablesV2().value,name="Calendar").id,Calendar_ID.Text);

     

     

    i am hitting and error referencing the Calendar_ID.Text inside the nested gallery

    BlessedCobba_1-1631673626569.png

     

    Everything works if the gallery is not nested and i just hard code the values to look up.
    How can i reference a text field inside a nested gallery? it just comes up blank?

  • Verified answer
    BlessedCobba Profile Picture
    459 Super User 2024 Season 1 on at

    I solved it by using a nested data table instead of nested gallery and changed the delete code to

    Office365Outlook.CalendarDeleteItemV2(LookUp(Office365Outlook.CalendarGetTablesV2().value,name="Calendar").id,DataTable7.Selected.id);
  • Verified answer
    Smilee279 Profile Picture
    135 on at

    I ended up doing something very similar.  On the OnSelect of the cancel button:

    Set(MyCalendarID,LookUp(Office365Outlook.CalendarGetTables().value,DisplayName = "Calendar").Name);
    Office365Outlook.CalendarDeleteItemV2(MyCalendarID,ThisItem.OutlookEventID);
    Remove('Desk Reservations',ThisItem)

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard