cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
iuchinglun
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

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.

View solution in original post

2 REPLIES 2

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.

View solution in original post

Thank you. It works!

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,948)