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 / Flow using switch fail...
Power Automate
Answered

Flow using switch fails if the condition expect is not there

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

I have a flow using switch that matches 3 entries. If there is a fourth entry and is not specified the flow failed. Ive tried to create a control (if) to tell the flow do nothing in this case, but this do not solve the problem. 

 

The flow get all entries and check first key with control if. passing the first control goes to switch to test the entries. If matches entry 1, 2 or 3 the flow continue with no problems. Anything different fails on this step

 

For some reason I cant add picture here so I only can describe the flow if needed. 

 

Really appreciate help here

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    a15.jpg

    Can you use this feature and add Terminate Step once the previous step fails

  • Verified answer
    Pstork1 Profile Picture
    69,022 Most Valuable Professional on at

    Switches have a default case that should pick up any cases that aren't specified.  The one exception to this is if the value being evaluated is null.  That causes an issue.  The fix for that is to add the value being evaluated by the switch inside a Coalesce() function that will supply a default value if the none exists.  In the screenshot below it uses the string "null" if a null value is found.  That will go to the default case if a specific case for "null" isn't added.

    image.png

  • lupompei Profile Picture
    Microsoft Employee on at

    Thank you, but the flow is independent. however this will help a lot in other flows. Really appreciate

  • lupompei Profile Picture
    Microsoft Employee on at

    Question, I m using the information that came from Azure Dev Ops. I need to compose the info ? I will test and them if solves I came back to accept as solution

  • Pstork1 Profile Picture
    69,022 Most Valuable Professional on at

    You don't need to use a compose.  That was just an easy way to get a null entry that I could change in a demo.  You can use Coalesce() around whatever string you are using for input to the switch.

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard