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!
Solved! Go to Solution.
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.
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.
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.
I tried this solution and keep getting the following error that seems to be a format problem but I have no idea on how to fix it. I looks like the end of the time is slightly different
The expression "2022-06-06T19:41:30Z gt 2022-06-06T18:31:34.2171038Z" is not valid. Creating query failed.
Hello, I am rather new to Power Automate. I will offer this as a possible avenue to explore.
create a substring
dynamically place from where you are getting your date in "Text"
starting position is "0"
length is "10"
Your are telling the program to limit the output of the date to 10. This covers the day, month and year plus -.
Most likely your visual output is 10 characters, but the output you have requested is expressed as many more characters and this is causing confusion. I hope this helps.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
User | Count |
---|---|
77 | |
18 | |
17 | |
14 | |
11 |
User | Count |
---|---|
133 | |
33 | |
31 | |
31 | |
24 |