cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Assepa
Helper III
Helper III

Get items with filter query (dates)

Hi

 

I would like to to gets items that were modified 7 day ago (not the past 7 days) and Status equal to Complete.

 

Reccurence is the trigger of the flow, flow run everyday of the week (all 7days)

 

ex: Today = 2022-02-12, so items modified on February 5 and with a Complete status should only return

 

ex: 2022-02-13, so items modified on February 6 and with a Complete status should only return

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
MarvinBangert
Super User
Super User

Hi @Assepa 

What is your data source? SharePoint, Excel, SQL, Dataverse, anything else?

SharePoint would be something like:

Date eq '@{addDays(utcNow(),-7,'yyyy-MM-dd')}' and Status eq 'Complete'

Please keep in mind if you are using the standard SharePoint fields "Modified" (or any other field with date and time), It also saves the time and you cannot compare it using the equals (eq) operator. You would need to do something more like between using greater than (gt) and less than (lt):

(Modified gt '@{addDays(utcNow(),-7,'yyyy-MM-dd')}' and Modified lt '@{addDays(utcNow(),-6,'yyyy-MM-dd')}' ) and Status eq 'Complete'

 

Does this help you? Otherwise please give me some more information.

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

Blog: Cloudkumpel

View solution in original post

2 REPLIES 2
MarvinBangert
Super User
Super User

Hi @Assepa 

What is your data source? SharePoint, Excel, SQL, Dataverse, anything else?

SharePoint would be something like:

Date eq '@{addDays(utcNow(),-7,'yyyy-MM-dd')}' and Status eq 'Complete'

Please keep in mind if you are using the standard SharePoint fields "Modified" (or any other field with date and time), It also saves the time and you cannot compare it using the equals (eq) operator. You would need to do something more like between using greater than (gt) and less than (lt):

(Modified gt '@{addDays(utcNow(),-7,'yyyy-MM-dd')}' and Modified lt '@{addDays(utcNow(),-6,'yyyy-MM-dd')}' ) and Status eq 'Complete'

 

Does this help you? Otherwise please give me some more information.

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

Blog: Cloudkumpel

Yes, its with SharePoint list and I use the column Modified. I will try your expression.

 

  • I suppose I can't have to include the @And {} in the expressions ?

Thanks!

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,297)