cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
meg2
Frequent 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
sudharsan1985
Solution Sage
Solution Sage

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
sudharsan1985
Solution Sage
Solution Sage

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...
v-bacao-msft
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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

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

Users online (1,508)