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

Trigger Condition Error with Times

I have a trigger condition as per below:

 

@not(LessOrEquals(triggerBody()?['Modified'],addMinutes(triggerBody()?['Flow Run'],2)))

 

It is supposed to prevent an infinite loop occurring, if date modified (+ 2 minutes) is not less than or equal to the flow run time then don't trigger however I am receiving this error when I run a test:

 

Blurryface_0-1599837253165.png

Blurryface_1-1599837269321.png

 

Thanks - any help is greatly appreciated!

2 ACCEPTED SOLUTIONS

Accepted Solutions

@Blurryface Yeah for using Trigger condition you need "@" .

 

The error tells me, "Paramater to be string that contains time".

 

Can you create a new  two action Power Automate(I do not want to start an Infinite Loop)

 

  • Same Trigger(on same library) but with no Trigger condition.
  • Add a compose action paste the same Formula and let me know if it completes.

 

It should help you debug the problem. 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

View solution in original post

@CFernandes 

 

I done that and found that my field was incorrectly named:

 

@not(LessOrEquals(triggerBody()?['Modified'],addMinutes(triggerBody()?['FlowRun'],2)))

 

I had put a space in it - thanks for tips on how to troubleshoot!

View solution in original post

6 REPLIES 6
PrasadAthalye
Super User
Super User

Can you remove @ before not? I tried following expression and it works fine...

 

not(lessOrEquals(utcNow(), addMinutes(utcNow(),2)))
 
Please mark this as an answer if it resolves your issue.
Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Hi Prasad,

 

Thanks for your comment this is specifically for Trigger Conditions which require the "@":

 

Blurryface_0-1599843077304.png

 

I am also using two date fields "Modified" (the systems field) and "Flow Run" a date field created in the list.

@Blurryface Yeah for using Trigger condition you need "@" .

 

The error tells me, "Paramater to be string that contains time".

 

Can you create a new  two action Power Automate(I do not want to start an Infinite Loop)

 

  • Same Trigger(on same library) but with no Trigger condition.
  • Add a compose action paste the same Formula and let me know if it completes.

 

It should help you debug the problem. 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

 

View solution in original post

@CFernandes 

 

I done that and found that my field was incorrectly named:

 

@not(LessOrEquals(triggerBody()?['Modified'],addMinutes(triggerBody()?['FlowRun'],2)))

 

I had put a space in it - thanks for tips on how to troubleshoot!

View solution in original post

yashkamdar
Super User II
Super User II

Hello Team,

 

It seems from the error that the expression is expecting a string but getting a value that is of type Date/Time, so you might need to modify your expression a bit to first format the existing Date/Time value to a string and then Add the +2 Minutes logic.

 

Here is an example reference that might help you in this-

https://support.microsoft.com/en-in/help/4534778/how-to-customize-format-date-and-time-values-in-a-f...

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

@Blurryface Wohoo i am glad that by tip helped you resolve the problem. Happy weekend!!

Helpful resources

Announcements
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 Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (61,675)