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 Apps / Multiple matches in sw...
Power Apps
Answered

Multiple matches in switch statement evaluate to same result

(3) ShareShare
ReportReport
Posted on by 1,207

I've looked in the documentation which lists the general format of a switch statement as follows: 

 

SwitchFormulaMatch1Result1 [, Match2Result2, ... [, DefaultResult ] ] )

 

I want to be able to have multiple matches that produces the same match result

 

SwitchFormulaMatch1Match2, Match3, Result1 [, Match4Result4, ... [, DefaultResult ] ] )

 

Does anyone know if this already possible?

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @Digital 
    This is already possible by writing an IF statement.  It is not the purpose of SWITCH.

    If(
     Condition1=true Or Condition2=true Or Condition3=true, Result1,
     Condition4=true, Result2
    )

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Digital Profile Picture
    1,207 on at

    Hey @mdevaney ,

     

    Thanks for the reply, I know I can do that with an If statement but other languages allow switch using multiple matches evaluating to same result. I suppose it's a nice to have rather than something that is necessary.

  • wbroens Profile Picture
    4 on at

    Hi,

     

    This is possible by using a ";" between your matches.

     

    So:

    SwitchFormulaMatch1;Match1b;Match1cResult1 [, Match2Result2, ... [, DefaultResult ] ] )

     

    gr

     

    Wim

  • markfleet Profile Picture
    108 on at

    Hi @wbroens. Is that a new feature? Its not working yet for me in authoring version 3.22061.6.

  • wbroens Profile Picture
    4 on at

    For some reason it is not working for me now. I think I was mistaken and made wrong assumption it worked.

     

  • ErwanF Profile Picture
    94 on at

    Yes you are correct, the semicolon solution will only take the first match value and then ignore the following code.

     

  • Manish MISTRY Profile Picture
    2 on at

    try Switch(true, match1astrue or match2astrue or match3astrue, effectfor12and3.....)

  • SamBou Profile Picture
    14 on at
    Unlike what @mdevaney said, it is absolutely one of the purposes of a Switch statement to allow for multiple matches.  This is the case in many programming languages and should be added to Power Apps.

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 Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard