Skip to main content

Notifications

Power Automate - Using Flows
Answered

Condition Failed

(0) ShareShare
ReportReport
Posted on by 36

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

  • abdisetarjama Profile Picture
    abdisetarjama 17 on at
    Re: Condition Failed

    I am getting this Error.  The reset of the flow is working perfectly, except for the condition part. The condition is to send an email if an expired date is found, and if not, then not to send an email. Can anyone help me with this issue?

     

    "InvalidTemplate. Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template language function 'greater' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Integer' that do not match.'."

     

    abdisetarjama_0-1711710738827.png

     

  • Verified answer
    v-bacao-msft Profile Picture
    v-bacao-msft on at
    Re: Condition Failed

     

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

  • Nuiii Profile Picture
    Nuiii 36 on at
    Re: Condition Failed

    @v-bacao-msft 

     

    I've tried but not help,

  • v-bacao-msft Profile Picture
    v-bacao-msft on at
    Re: Condition Failed

     

    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
    Nuiii 36 on at
    Re: Condition Failed

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

  • Nuiii Profile Picture
    Nuiii 36 on at
    Re: Condition Failed

    @ScottShearer 

     

    it's still failed on condition.

  • ScottShearer Profile Picture
    ScottShearer 25,150 on at
    Re: Condition Failed

    @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
    Nuiii 36 on at
    Re: Condition Failed

    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
    ScottShearer 25,150 on at
    Re: Condition Failed

    @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
    Nuiii 36 on at
    Re: Condition Failed

    @ScottShearer 

     

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

    Conditions 3.png

     

    Thank you,

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard

Featured topics

Restore a deleted flow