Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Error after switch function "an unexpected exception encountered when evaluating branching condition."

(0) ShareShare
ReportReport
Posted on by 29

I am trying to build a flow which is triggered by a form, which then checks the data received against a price list on excel. Once it works out which price is correct, it will populate a word template ready to be sent off as a quote.

 

My current issue is at switch, where it fails due to the error (an unexpected exception encountered when evaluating branching condition) on the correct case. If i were to leave case blank with just the equals value everything runs fine. Its when i try to continue the flow it gives me the error. I'm trying to use compose in each of the cases but I have a feeling i'm missing a step. I've also tried just populating the word template with a set value instead but it still comes up with the error. Any guidance would be greatly appriciated.

  • Verified answer
    creativeopinion Profile Picture
    10,450 Super User 2025 Season 1 on at
    Re: Error after switch function "an unexpected exception encountered when evaluating branching condition."

    @conorsanchez 
    What is the output of the Compose action above the Switch action? If your value is an integer, you will need to use an expression in the Switch cases to convert the 10 into an integer. 

     

    Try the int() function.

     

    Hope this helps!


    If I helped you solve your problem—please mark my post as a solution ✅.
    Consider giving me a 👍 if you liked my response!

    👉 Watch my tutorials on YouTube
    👉 Tips and Tricks on TikTok

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1