cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Help with pulling a certain item for the past 7 days

I'm trying to figure out how to do a filter query to pull in everything from a SharePoint list that is not in a completed status (no matter the date), and then I need to somehow add in a filter to also include anything in a completed status that has a decision date (that's the name of the column) from the past 7 days.  Any ideas?  I'm pulling the info in and creating a table to send an automated email out once a week to give a team updates on their requests.  The main thing I'm trying to achieve is to send a fully inclusive report, but limit the amount of completed items to only those that were completed in the last week.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Hi @meg2 

Use the Get Items action with the filter query property to filter the items that are not with the completed status. Add an action named Filter array to filter the output from the Get Items action. Use the below condition

<Source: Date column> <Condition: greater than or equal to> <Value: addDays(utcNow(), -7, 'yyyy-MM-dd'))>

sudharsan1985_0-1604125478474.png

Try it out and let me know.

 

 

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Hi @meg2 

Use the Get Items action with the filter query property to filter the items that are not with the completed status. Add an action named Filter array to filter the output from the Get Items action. Use the below condition

<Source: Date column> <Condition: greater than or equal to> <Value: addDays(utcNow(), -7, 'yyyy-MM-dd'))>

sudharsan1985_0-1604125478474.png

Try it out and let me know.

 

 

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

View solution in original post

Highlighted
Community Support
Community Support

 

Hi @meg2 ,

 

You can consider using Filter Query to filter items, please refer to the following article for more information about the usage of this feature:

https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/

 

You also need to use the WDL function to calculate the date seven days ago, and then compare it with the date recorded in the item. Please refer to the following document to understand the Date and time function:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference#d...

 

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.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (10,112)