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

Condition Failed

Hi Guys,

 

I have a problem with flow with a condition, the flow check the number of date that users selected (using switch) and then the flow check the Date in form with date+30 days, then if the condition is true create the event to users.

 

then I got failed on condition after every run.

 

see attached screenshot

 

Conditions.pngConditions 2.png

 

My expression code is

formatDateTime(items('Apply_to_each_2')?['End_x0020_Date'],'d/M/yyyy')
is equal to
addDays(utcNow(),30,'d/M/yyyy')

 

Thank you

10 REPLIES 10
Highlighted
Super User III
Super User III

@Nuiii 

Can you post a screen shot of the actual error message that is generated?

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted

@ScottShearer 

 

ActionConditionFailed. The execution of template action 'Condition' failed: an unexpected exception encountered when evaluating branching condition.

Conditions 3.png

 

Thank you,

Highlighted

@Nuiii 

I don't see anything obviously wrong. 

Can you verify that you are referencing the end date column properly by doing the following:

  1. Open a previous run from run history
  2. Scan the output of the Get Items action for a reference to end date
  3. Verify that the reference to end date looks like End_x0020_Date

On another note, your Flow would be more quicker and more efficient if you were to use a filetr query in Get items (OData filter) rather than a condition.

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted

Yes, the column is corrected

 
and the data from get items is corectted too,
 
by the way, thank you for your advice,
 
Nuiii
Highlighted

@Nuiii 

Try this:

  1. Remove the expression from the left side of your condition and reference the column directly from Dynamic properties
  2. Change the date format in the right side of the condition to the following: yyyy-MM-dd

Please let me know if this helps.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted

@ScottShearer 

 

it's still failed on condition.

Highlighted
Regular Visitor

@ScottShearer 

 

I just tried to change something in my flow, 

 

I've removed the switch (control) out, then the condition working well.

 

I think maybe from that point.

 

Just let you know, if you have any information about that point please share.

 

Thank you.

Highlighted

 

Hi @Nuiii ,

 

Have you tried changing End_x0020_Date to EndDate?

Currently in Flow, if there is a space in the middle of the field name, you could ignore the space.

Also if you change the field name, you need to configure the expression with the initial field name.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

@v-bacao-msft 

 

I've tried but not help,

Highlighted

 

@Nuiii 

 

Have you tried using another Date field in the List to do similar tests?

Please try to recreate a similar Flow and change d/M/yyyy to yyyy-MM-dd and check if the issue still exists.

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (11,843)