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

Switch Error

(0) ShareShare
ReportReport
Posted on by 9

I am trying to use a switch in power automate based on a department code (the code is a number 1,2,3,4 ect). I think the problem may be with the switch feature. The flow runs and the below is the errors given at Apply to each, Switch, and Case steps in the flow:

Apply to each error:
Action Failed. An action failed. No dependent actions succeeded.

Switch error:
Action Failed. An action failed. No dependent actions succeeded.

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

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @sessionst ,

     

    Please refer to below thread:

    Solved: An unexpected exception encountered when evaluatin... - Power Platform Community (microsoft.com)

     

    Checking if replacing numbers with strings in cases step could solve this issue.

     

    Best regards,

  • Verified answer
    sessionst Profile Picture
    9 on at

    Switch *On should be string or integer.

    In the event the case reference is a number that is compared to the Switch *On you will need to convert the *On input to integer.  To do this, you use an expression to convert the number to integer. At the Switch *On field, you input this expression:

     

    int(item()['you enter the list column name here'])   

     

    This worked for me to solve my problem, as I am pulling a department code selection (the department code is a number 1,2,3,4, ect) from a Sharepoint list column to then drive the Case flow. 

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