Skip to main content
Community site session details

Community site session details

Session Id : KW9PQ1JdVAlF1gsDUKrwao
Power Apps - Building Power Apps
Unanswered

Maximum Switch statements

Like (0) ShareShare
ReportReport
Posted on 8 Jul 2021 14:26:44 by 1,257 Super User 2024 Season 1

Is there a maximum number of items you can have in a switch statement?  Looks like I might have approx 25 is this too many? does it affect performance?

Categories:
  • CNT Profile Picture
    10,919 Super User 2024 Season 1 on 12 Jul 2021 at 14:00:29
    Re: Maximum Switch statements

    @vffdd Let me know if you need any help to redesign!

  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on 12 Jul 2021 at 11:13:59
    Re: Maximum Switch statements

    Yeah you are right ! I need to have a think about it myself to see if a more efficient way 🙂 I'll come back to you as will prob need suggestions but going to work on it myself first.. thanks I'll leave this open for the moment if that's ok

  • zmorek Profile Picture
    3,272 on 08 Jul 2021 at 21:28:41
    Re: Maximum Switch statements

    I agree with @CNT , perhaps there's a better way to do it? Care to share some specifics and maybe we can help?

  • CNT Profile Picture
    10,919 Super User 2024 Season 1 on 08 Jul 2021 at 20:41:31
    Re: Maximum Switch statements

    @vffdd The documentation does not specify any limit. Also there no performance issues because only one branch of the Switch is going to be executed. But....

    ...having 25 branches doesn't seem very good design let alone maintainability of the code!

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!