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
Solved! Go to Solution.
Hey @WesselO
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:
In Power Apps just save the response in a variable:
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.
Hey @WesselO
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.
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:
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?
Hey @WesselO
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:
In Power Apps just save the response in a variable:
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.
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?)
this is how i implemented your suggestion in my flow,
Hey @WesselO
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.
Hey @MarvinBangert,
for some reason its not recognizing that i have this response or something?
when i push it without the .EventID, it just returns "true"
Hey @WesselO
if you just add a dot after the run(), does Power Apps suggest you a value? Like:
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.
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.
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
257 | |
247 | |
82 | |
36 | |
30 |
User | Count |
---|---|
299 | |
266 | |
117 | |
66 | |
45 |