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 Platform Community / Forums / Power Automate / A switch inside of a c...
Power Automate
Answered

A switch inside of a condition inside of a apply to each

(0) ShareShare
ReportReport
Posted on by 353

Have you ever come across this or do you have some insight for me?

 

Background

I have an apply to each evaluating rows of an excel table.

I have a condition inside of that apply to each that checks if a date column equals today

If the condition is met, there is a switch condition that looks at a status value and then performs an action

 

schuess3_0-1654808772252.png

 

 

Problem

No matter what i put in a switch case, it fails with the following error message

 

"ActionConditionFailed. The execution of template action '[ACTION NAME HERE]' failed: an unexpected exception encountered when evaluating branching condition."

 

Again, no matter what i put under the switch case it fails. 

 

THoughts? @faustocapellanj @Pstork1 @Flownaut @RezaDorrani @Shanescows 

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,417 Most Valuable Professional on at

    I have nested switches inside conditions inside Apply to Each loops so its definitely possible.  Looking at your screen shot I suspect the problem may be your evaluation condition.  Switch is built to work by evaluating a string, but it looks like the value comes out as an integer.  Have you tried making sure that you end up with a string and not a number?

  • schuess3 Profile Picture
    353 on at

    Well @Pstork1 you pretty much nailed it. I guess it is too much to ask for a message that says "expecting string, but received integer instead" 🙂

     

    As a recap, if you are using a switch condition, and you want to put a numeric character like 1, 2, or 3, the switch condition seems to evaluate down the correct path, but then throws an error. Apparently, you need to put a text string in the case.

     

    Thanks for your help.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 997

#2
Valantis Profile Picture

Valantis 810

#3
Haque Profile Picture

Haque 642

Last 30 days Overall leaderboard