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

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
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (74,719)