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 Automate / Need help with Microso...
Power Automate
Unanswered

Need help with Microsoft Forms and Microsoft Shift automation

(0) ShareShare
ReportReport
Posted on by

Hi guys, I need your help. I have automated the following process, a normal user can specify via Microsoft Forms on which day he is in the home office or at the location and this then automatically creates a shift for the user in Microsoft Shift. Since the user cannot create shifts as a normal user, the flow runs via my account, which has owner rights. It all works really well.

 

Now I have added another flow where the user also can delete the shift via the forms and the date field. The problem is that I can't manage to do it that the shift is only deleted by the user who sent the forms. All shifts of all users are deleted on that day. Probably because everything is created via my account. Is there any workaround? Let me show you a screenshot but that flow is completely wrong now cuz I changed so much and I'm sad haha.

 

1000045788.jpg

 

Thank you very much. I appreciate it.

Categories:
I have the same question (0)
  • mtd2020 Profile Picture
    6 on at

    It's hard to say exactly what your issue is. Also, it sounds like this may have happened to the form everyone uses, so you may want to test it on a form first before letting everyone use the feature.

    The first possible problem is that you need to use 'Get a Shift' instead of 'List all Shifts.' It's hard to say for sure, but it seems with the code you've shown that shift user and display name are always equal. Then in your "for each" loop each shift is deleted.

    If "Get a Shift" needs an ID itself which most things like this in power automate do, there is certainly a work around, but I'm not too familiar with Microsoft Shifts. However, what I think you could do is keep the 'List all Shifts' block, Filter the Array based on the name of the employee, and then select the first option from the name.
    This is what the Filter the Array might look like, but yours would have actual variables.

    mtd2020_0-1711568959112.png

    I'm not sure what that data structure looks like that is returned by 'List all shifts,' but you can use expressions to retrieve the ID. If you would like more help, try to attach some more screenshots. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 711

#2
Vish WR Profile Picture

Vish WR 691

#3
Haque Profile Picture

Haque 525

Last 30 days Overall leaderboard