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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Deleting a outlook eve...
Power Apps
Answered

Deleting a outlook event with a button

(0) ShareShare
ReportReport
Posted on by

Hi there, i have 2 buttons. one with which i create a outlook event and then i have another with which i delete a outlook event, the one creating the outlook event is working fine. it creates a event with always the same name, always from 8am to 5pm. and the location name changes depending on what u selected when creating the event.  now im trying to figure out how to find and delete this same event with the second button. anyone can help me here? i have tried using odata but it's not making much sense to me

 

available data to find the right event: 
- the location name
- the date

Categories:
I have the same question (0)
  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @Anonymous 

     

    I used the "Office365Outlook.CalendarDeleteItemV2()" command in Power Apps to delete the item. It has the parameters "Calendar" and "Item [id]". To select the correct calendar I created a dropdown with the function "Office365Outlook.CalendarGetTablesV2().value". Displayname is "name".

    This is my OnSelect-function on my button to delete items:

    Office365Outlook.CalendarDeleteItemV2(Dropdown1.SelectedText.id,First(Office365Outlook.CalendarGetItems(Dropdown1.SelectedText.id).value).Id)

    Because you cannot save the ID of the created item (if you do not use a Power Automate Flow), I used the "First" action to get the last created item from my calendar. Then the last created event will be deleted.

     

    Hope this will help you!

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • Community Power Platform Member Profile Picture
    on at

    hey @MarvinBangert

     

    Thanks for your quick response, i forgot to mention i am doing this using powerflow,

    the flow i create the event with looks like this, it executes on a button click in power apps:

    2020-09-13 14_00_38-Edit your flow _ Power Automate.png
    I made it this way cause i have people who use a different language and people who use English in their outlook app.

    Would you say deleting the event using your suggested option would be better than deleting the event with a flow? 

  • Verified answer
    MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @Anonymous 

     

    That's totally fine, if you use a Power Automate Flow, you should add an action "Respond to a Power App or flow" and respense the ItemID of your created item to Power Apps:

    MarvinBangert_0-1599999401535.png

    In Power Apps just save the response in a variable:

    MarvinBangert_1-1599999457901.png

    To delete the item, you could add a button that starts another flow and you pass the correct ItemID to your flow or you could use the function I used to delete the item without using a flow.

    Flow is much neater if you want to troubleshoot your process.

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • Community Power Platform Member Profile Picture
    on at

    Hey @MarvinBangert, this is giving me a lot of good ideas thank you so much!

    I'm getting stuck on a little part, i'm sure im missing something simple. heres where i am trying to saving it so i can patch in the next part. ( i am saving the variable on the same button im executing the event creation, is this a problem?)

    WesselO_0-1600000484447.png

    this is how i implemented your suggestion in my flow, 

    WesselO_1-1600000529623.png

     




  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @Anonymous 

    your flow looks fine, but in your Power App, you need to add the Set()-Function around your "GenerateOutlookEvent.Run" like:

    //make Outlook event
    Set(_AgendaId;GenerateOutlookEvent.Run(...).EventId);

     

    If you click the button, the flow is starting first and after that, it responses to your Power Automate with the EventId. This EventId is saved in the variable "_AgendaId".

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • Community Power Platform Member Profile Picture
    on at

    Hey @MarvinBangert,

     

    for some reason its not recognizing that i have this response or something?

    WesselO_0-1600002821021.png


    when i push it without the .EventID, it just returns "true"

  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @Anonymous 

    if you just add a dot after the run(), does Power Apps suggest you a value? Like:

    MarvinBangert_0-1600003502356.png

    Then just select the suggested value, if you enter the name by yourself, maybe it is not recognized as a valid response.

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • Community Power Platform Member Profile Picture
    on at

    It unfortunately doesn't suggest me a value @MarvinBangert 

  • MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Have you saved your flow?

    Otherwise, you maybe need to remove and readd your flow to your button (make sure you copy and save everything from your buttons OnSelect property, because everything will be removed if you readd your flow!!).

    Select your button and click on "action" - "Power Automate", you should see the flows associated with your button. Click on the three dots and select "remove from app", afterwards select the same flow from the list below. After the flow is added, insert everything you saved before you deleted the flow from the button. Try again to add a dot after the run() if it suggests you the "eventId".

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • Community Power Platform Member Profile Picture
    on at

    hey @MarvinBangert

    Thank you very much. readding worked, so now i just have to patch it to my list and then i can easily delete it using the id.
    Thank you again!

     

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

Forum hierarchy changes are complete!

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard