cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
haniel
Level 8

Filtering "Get Items" by Modified month

Hello all,

 

I'm trying to create a flow that returns all items in a SharePoint list that were modified in the previous month.  Can someone help me with the proper syntax for the Filter Query?  Below is a screen shot of the Last Month variable calculation and the list I'm trying to query.

 

 DateQuery.png

 

 

Thanks,

-Haniel

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Filtering "Get Items" by Modified month

Month(Modified) does not work in Flow. You have to use the functions available in Flow. This is what I came up with:

 

FlowModifedFilteredLastMonth.png

Observe that each expression above is surrounded by ' - single quotes!

 

where the first expression is defined as - start of last month:

startOfMonth(getPastTime(1,'MONTH'))

 

and the second expression is defined as - start of current month:

startOfMonth(utcNow())

 

This works for me 🙂 Hope this helps you on the way!

Kind regards, John

View solution in original post

7 REPLIES 7

Re: Filtering "Get Items" by Modified month

Month(Modified) does not work in Flow. You have to use the functions available in Flow. This is what I came up with:

 

FlowModifedFilteredLastMonth.png

Observe that each expression above is surrounded by ' - single quotes!

 

where the first expression is defined as - start of last month:

startOfMonth(getPastTime(1,'MONTH'))

 

and the second expression is defined as - start of current month:

startOfMonth(utcNow())

 

This works for me 🙂 Hope this helps you on the way!

Kind regards, John

View solution in original post

Prav
Level: Powered On

Re: Filtering "Get Items" by Modified month

Hello,

Using the above expression but getting the error message below:

The expression "Modified ge '2019-07-01T00:00:00.0000000Z' and Modified It '2019-08-01T00:00:00.0000000Z'" is not valid.

Re: Filtering "Get Items" by Modified month

Hello Prav

 

Please provide a screenshot of the actual flow step, where you have defined this Filter Query. Also provide the expression that you use. Thus we may be able to help you 🙂

 

Kind regards, John

Prav
Level: Powered On

Re: Filtering "Get Items" by Modified month

error.png

 

Get Items from Sharepoint.

Re: Filtering "Get Items" by Modified month

The screenshot looks ok, but what are the expressions that you are using?

Kind regards, John

Kush
Level: Powered On

Re: Filtering "Get Items" by Modified month

Modified ge '@{startOfMonth(getPastTime(1,'Month'))}' and Modified It '@{startOfMonth(utcNow())}'

Re: Filtering "Get Items" by Modified month

The issue is your 2nd part - the less than is not an L and T (lowercase) - please rewrite it 🙂

Kind regard, John

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,618)