cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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

28 REPLIES 28

Hi

Many thanks for submitting this flow. I'm trying to replicate but having issues with the Get Items 2 and the filter query. I'm not sure what it should be filtering

 

"The expression \"Work Email Address eq 'testt@domain.org'\" is not valid.\r\nclientRequestId: bbe5ce99-86ac-45c1-9227-9d4babea1718\r\nserviceRequestId: bbe5ce99-86ac-45c1-9227-9d4babea1718"
 
Any help appreciated

Have you got an image of the filter query you're running?

I think Work Email Address should be the actual column name, you can find the actual column by going to your SharePoint List > List Settings (top right cog) > then at the bottom left you have a list of each column, click on the column you need and check the URL. Copy everything at the end after &Field=

 

Hopefully this helps

Have you got an image of the filter query you're running?

I think Work Email Address should be the actual column name, you can find the actual column by going to your SharePoint List > List Settings (top right cog) > then at the bottom left you have a list of each column, click on the column you need and check the URL. Copy everything at the end after &Field=

 

Hopefully this helps

Amazing. Got that working.

The final bit I'd like to do is get the data from the last month.

On the get items section I tried the following filter query

 

Work_x0020_Email_x0020_Address eq '@{items('Apply_to_each')?['Work_x0020_Email_x0020_Address']}' AND Date_x0020_Worked '@{startOfMonth(getPastTime(1,'MONTH'))}

 

query.JPG

 

The filter worked before adding the AND in, and the actual column name for Date_x0020_Worked is correct.

 

Thanks again

I may be wrong but you might be best adding in a nested apply to each loop with the date filter?

I've created an apply to each and put another filter query in but get the following:

 

{
"status": 400,
"message": "The expression \"Date_x0020_Worked ge '2020-01-01T00:00:00.0000000Z' and Date_x0020_Worked Lt '2020-02-01T00:00:00.0000000Z'\" is not valid.\r\nclientRequestId: 84aa43ac-5f9c-46f2-be88-686d228b0512\r\nserviceRequestId: 84aa43ac-5f9c-46f2-be88-686d228b0512"
}
 
 
With expressions as:
startOfMonth(getPastTime(1,'MONTH'))
 
and
startOfMonth(utcNow())
 
Thanks

Wonder why you're getting all them zeros in 2020-01-01T00:00:00.0000000Z, should be 2020-01-01T00:00:00Z

Not sure. It's formatted as a data in the list

 

column.JPG

OK, we're passing on the idea of pulling the month through.

 

However, what I would like to implement now, is rather than having the "send an email", it is an approval.

I tried this via "Start and wait for an approval" however, it was waiting for each one to be approved before moving onto the next.

I tried "Start an approval" but as it's not waiting to move onto the condition, the approval is always rejected.

 

Any idea where I can add the approval?

 

Also, does an approval action use HTML like "send an email" does as it comes through as code

 

html.JPG

 

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (35,776)