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

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
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (85,278)