cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Condition Expression: Modified < 30 seconds

I need to create a condition that will do this:

If modified (the system field from a SharePoint list) < 30 seconds compare to current time, termiate the flow;

Else email user

 

I am stuck on writing the expression in the Condition. Any help would be greatly appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Condition Expression: Modified < 30 seconds

Hi @iuchinglun this should do the trick

 

If

addSeconds(triggerBody()?['Modified'],30)
is greater than or equal to
utcNow()
Then do your True actions
Else do your False actions
 
I have used the expression "addSeconds" which will allow me to take a datetime and add a number of seconds to it. It takes the format:
addSeconds(DATETIME, NUMBER OF SECONDS)
 
I have then just used utcNow() to get the current datetime stamp
 
It might be worth considering that sometimes, especially when under load, Flow may take longer than 30 seconds to actually fire. But for now that should get you going.




Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

2 REPLIES 2
Highlighted
Super User
Super User

Re: Condition Expression: Modified < 30 seconds

Hi @iuchinglun this should do the trick

 

If

addSeconds(triggerBody()?['Modified'],30)
is greater than or equal to
utcNow()
Then do your True actions
Else do your False actions
 
I have used the expression "addSeconds" which will allow me to take a datetime and add a number of seconds to it. It takes the format:
addSeconds(DATETIME, NUMBER OF SECONDS)
 
I have then just used utcNow() to get the current datetime stamp
 
It might be worth considering that sometimes, especially when under load, Flow may take longer than 30 seconds to actually fire. But for now that should get you going.




Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!
If you liked my response, please consider giving it a thumbs up. THANKS!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

Highlighted
Frequent Visitor

Re: Condition Expression: Modified < 30 seconds

Thank you. It works!

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (3,425)