cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PowerGell54
Helper II
Helper II

Overtime Entries Multiple Users Flow

Hi,

 

I have an idea to automate our company overtime forms. Id like to use PowerApps for data entry and use a SharePoint List to hold the data, the list will consist of standard strings such as name, manager, time spent, internal reference etc.

I'd like to build a Flow to run at 8am in the morning and get all the data and submit to each manager for approval, the catch is, users may submit multiple list items as they may get called out at different times during the night and submit different items.
With a list with multiple users and possible multiple entries for one user, how would i build a Flow to gather all the items for one user and present them in an email to their manager?

 

If there is a better way to attack this let me know!

 

Hope it makes sense, let me know if you need to know anything else.

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions

28 REPLIES 28
PowerGell54
Helper II
Helper II

Anyone?

Okay, here is what I have.  I create a list of users, this would be the list of employees that you want get the hours for.  There are other ways to get the list of users but this is just one way that I have used in the past.  Then we loop and get the hours for each users. Next we build a table for all the entries for that user and add that table in a email or approval.

TimeSheet1.jpg

 

 

 

TimeSheet2.jpg\

TimeSheet3.jpg

 

TimeSheet4.jpgIf this has helped please mark as a solution.

 

 

I’d either do it the same way @spsolutionsgrp solved it... or put an OrderBy User into the SharePoint Get Items action.

Then use a Do Until loop to keep track of the current users items, building a table and just keep looping through until the User changes. Then send the email and carry on for the new user.

- Mark

Hi @PowerGell54,

 

Could your problem solved by @spsolutionsgrp's solution, if yes, please consider Accept it as the solution to help the other members find it more quickly, if no, please share more details about your sharepoint list and I would provide a proper workaround for you.

 

Best regards,

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This is fantastic, thank you, I've copied this and working great!

 

However, I'm having issues with the send email part as the user's have different managers.

I've added a column with the manager's emails but I'm having difficulty making it dynamic for each created HTML table.

 

Any ideas on this?

 

Sharepoint.PNG

 

I've gathered all the info for each user in "Title" into 1 HTML table, but sending it via email to the "Manager Email" only once is proving challenging.

 

Thank you

You want to add the manager to the users list or if the managers are filled out in user profile you could look up the manager.

Here are the two options.  Either add the manager to your list of users or if you have the manager field filled out in Active Directory you could use the action to get manager.

 

ListofUsers2.jpgManager.jpg

Thank you, i've applied this but it is still sending the gathered HTML multiple times for each user:

 

(in reference to my pic above)

3 of the same HTML email to Daniel Gell's manager
4 of the same HTML email to Service Desk's manager

 

Id just like 1 email per gathered HTML to their Manager

 

Thank you again, i apprieciate this!

Im wondering if its the placement of the Send Email action in the outer loop? 


If there are 7 values on the 1st Apply to Each it will send 7 emails no matter what.

 

I've seen the Do Until method on these forums before and tried it but it was doing the same thing.

 

 

The first apply to each should be going through the list of users.  In that list there should not be duplicate users so one emails should be sent for each users manager.

 

Here is my user list.

list1.jpg

 

Here is my time list.

 

Thank you but unfortunately there has to be duplicate users in my list 😞

I think you may have the wrong value in the email field.  Make sure it is a value from the first get items list (user list).  Here is a video that may help.

 

https://spheroes-my.sharepoint.com/:v:/g/personal/tmccleary_spsolutionsgrp_com/ESeVI6wPza1Oio_OiMWPp...

 

not in the user list.  The user list is just a list of your employees and their manager and is users to build a filter.  If the users list does not work for your solution there may be other options.

Here is a solution without the second user table.   This version uses a varible to track what users we have already sent the email for.   

 

TimeEntryv2.jpg

This is great thank you! Could you send me a higher resolution image as im unable to see it please?


 

 

 


2019-02-13_7-17-41.jpg

2019-02-13_7-18-02.jpg2019-02-13_7-18-20.jpg

2019-02-13_7-18-31.jpg

Gonna give this a whirl now, will let you know how i get on!

It works, thank you so much for this!

 

Accepted as Solution!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (2,947)