cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Get Items Filter Odata from SharePoint list created column

Dear all,

 

I'm still new in Power Automate. Need your advise on this.

 

I wanted to use filter query in Get Items action. I want to filter the "Created" column from SharePoint list and only show records that are created in current month and year only. For example current month is February 2021, so it will only shows records that have been created in February 2021 only.

 

1.png

Thank you and your help is much appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions
DamoBird365
Super User
Super User

Morning @Anonymous 

 

You need to use the filter query where the created date is greater than or equal to the 1st of the current month.

 

concat(formatdatetime(utcNow(),'yyyy-MM'),'-01')

 

DamoBird365_0-1614326601908.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

View solution in original post

6 REPLIES 6
DamoBird365
Super User
Super User

Morning @Anonymous 

 

You need to use the filter query where the created date is greater than or equal to the 1st of the current month.

 

concat(formatdatetime(utcNow(),'yyyy-MM'),'-01')

 

DamoBird365_0-1614326601908.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

Anonymous
Not applicable

Hi @DamoBird365 ,

It's working fine. Thank you for your help!

Anonymous
Not applicable

Hi @DamoBird365 

If I want to modify the code by current week filter then how? Can assist me on this?

Thank you.

DamoBird365
Super User
Super User

Hi @Anonymous 

 

You would be able to calculate a date 7 days prior using a subtract from time action and then compose to format the date time.

 

You can then try using the expression below

 

created gt '7DaysEarlierComposeBelow'

 

DamoBird365_0-1616394517885.png

 

If you want to be even more specific, you can use an AND expression

 

created gt '7DaysEarlierComposeBelow' and created lt 'anotherdatethatyouvecalculated'

 

If this post helps, don't forget to mark it with Accept it as the solution to help the other members find it more quickly.
Cheers,
Damien


P.S. take a look at my new blog here

 

Ramon3
Regular Visitor

hello everyone can someone help me with the following situation, I have a sharepoint list, with my activities, where I have the due date and would like to receive an email every Monday with the activities planned for that week, I tried use the Odata filter but it didn't work.

Hi @Ramon3 

 

Please post a new query and someone from the community will help you

 

Damien

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,510)