cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
iuchinglun
Level: Powered On

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
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!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

2 REPLIES 2
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!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

View solution in original post

iuchinglun
Level: Powered On

Re: Condition Expression: Modified < 30 seconds

Thank you. It works!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 102 members 3,838 guests
Please welcome our newest community members: