web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Condition Failed

(0) ShareShare
ReportReport
Posted on by 65

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

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @Nuiii 

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

     

  • Nuiii Profile Picture
    65 on at

    @ScottShearer 

     

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

    Conditions 3.png

     

    Thank you,

  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @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.

     

  • Nuiii Profile Picture
    65 on at

    Yes, the column is corrected

     
    and the data from get items is corectted too,
     
    by the way, thank you for your advice,
     
    Nuiii
  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @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.

     

     

  • Nuiii Profile Picture
    65 on at

    @ScottShearer 

     

    it's still failed on condition.

  • Nuiii Profile Picture
    65 on at

    @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.

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    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,

  • Nuiii Profile Picture
    65 on at

    @v-bacao-msft 

     

    I've tried but not help,

  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    @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,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 573

#2
Valantis Profile Picture

Valantis 407

#3
11manish Profile Picture

11manish 387

Last 30 days Overall leaderboard