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

Get sharepoint list items that were created in the past week.

Hello

 

I look to have an email sent every Friday to myself at 0800.

The email will include the number of sharepoint list items created. 

 

I want to filter this by sharepoint list items created within the last 7 day period of when the email gets sent.

This is where I am struggling.

 

Help would be much appreciated.

 

Below is my flow in its current state.

 

Compliance.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Get sharepoint list items that were created in the past week.

Hi @CameronTCD ,

 

  • Please try using Filter array to filter out newly created items in a week.
  • Then use length() function to get the length of the array, which is the number of items.
  • Consider using Condition to determine the number of items, and send the message when it is greater than 0.

Expression reference:

@greater(item()?['Created'], addDays(utcNow(), -7, 'yyyy-MM-dd'))

Image reference:

9.PNG

Hope it helps.

 

Best Regards,

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

View solution in original post

6 REPLIES 6
Highlighted
Dual Super User III
Dual Super User III

Re: Get sharepoint list items that were created in the past week.

Hi @CameronTCD 

 

Please refer to the screenshots below:

flowww.png

 

flooow.png

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Helper II
Helper II

Re: Get sharepoint list items that were created in the past week.

Thank you!

 

What is in the 'initialise varibale' though?

Highlighted
Dual Super User III
Dual Super User III

Re: Get sharepoint list items that were created in the past week.

@CameronTCD 

 

Nothing. You can leave it blank.

Highlighted
Community Support
Community Support

Re: Get sharepoint list items that were created in the past week.

Hi @CameronTCD ,

 

  • Please try using Filter array to filter out newly created items in a week.
  • Then use length() function to get the length of the array, which is the number of items.
  • Consider using Condition to determine the number of items, and send the message when it is greater than 0.

Expression reference:

@greater(item()?['Created'], addDays(utcNow(), -7, 'yyyy-MM-dd'))

Image reference:

9.PNG

Hope it helps.

 

Best Regards,

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

View solution in original post

Highlighted
Helper IV
Helper IV

Re: Get sharepoint list items that were created in the past week.

Thanks, it was useful.

Highlighted
Helper II
Helper II

Re: Get sharepoint list items that were created in the past week.

Hey @v-bacao-msft ,

 

I've done everything you have recommended but I am still getting an error message. Any idea why? 

 

Screen Shot 2020-06-04 at 4.14.37 PM.png

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (1,144)