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

Community site session details

Session Id : xIT4rE6MsKrsR//ZFMMlQV
Power Automate - Using Flows
Answered

Switch Error

Like (0) ShareShare
ReportReport
Posted on 6 Jun 2023 07:30:13 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.

  • Verified answer
    sessionst Profile Picture
    9 on 07 Jun 2023 at 08:19:56
    Re: Switch Error

    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. 

  • v-jefferni Profile Picture
    on 07 Jun 2023 at 07:29:03
    Re: Switch Error

    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,

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

Announcing our 2025 Season 2 Super Users!

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

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!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Featured topics

Restore a deleted flow
Loading complete