cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
landonjochim
Resolver I
Resolver I

Get Items Filter Query - Last Modified over 2 Hours from Now

I have a Scheduled Flow running every 2 hours. I am using the Get Items action and I would like to retrieve only list items that have not been modified for over 2 hours. I will then perform an action on each of those items.

 

I will use the Filter Query to return only the items that meet this result. Struggling with the formula. 

 

Modified lt subtractFromTime(utcNow(), 2, "Hour")

 

Additional question: Is there anyway to Not run the scheduled flow using Trigger Conditions if there are no items in the list with the Modified over 2 hours ago? I am doubtful here.

 

Please help with the filter query.. Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User II
Super User II

Hello @landonjochim ,

Modified lt 'addToTime(utcNow(), -2, 'Hour')'

addToTime(...) must be entered as an exprssion

You can't tell the flow to not run if there're no new items, the flow doesn't know at the time when it's triggering the items it'll process = you can't block it from running.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

2 REPLIES 2
PrasadAthalye
Super User
Super User

Use Single quotes instead of double.

 

Modified lt 'subtractFromTime(utcNow(), 2, 'Hour')'

 

 

You can not set trigger condition since there is no reference to SharePoint since its a schedule trigger.

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
tom_riha
Super User II
Super User II

Hello @landonjochim ,

Modified lt 'addToTime(utcNow(), -2, 'Hour')'

addToTime(...) must be entered as an exprssion

You can't tell the flow to not run if there're no new items, the flow doesn't know at the time when it's triggering the items it'll process = you can't block it from running.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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 on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (91,067)