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 Apps
Answered

IF or Switch

(0) ShareShare
ReportReport
Posted on by 62

Hi I have a the following If Statement to compare four combobox selections, this works as required but I need to nest more than 50 further If's, so need if possible to change this to a switch.

 

If(Q1Label.Text = "One" && Q2Label.Text = "Two" && Q3Label.Text = "Three" && Q4Label.Text = "Four",

If(Q1Label.Text = "Five" && Q2Label.Text = "Six" && Q3Label.Text = "Seven" && Q4Label.Text = "Eight",

Navigate(Feedback,ScreenTransition.None),Notify("Not all the answers are correct, please try again",NotificationType.Error)))

 

Is this possible?

 

Any advice welcomed.

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,463 Most Valuable Professional on at

    Hi @Newbeetle1 ,

    From what you have posted, no - Switch() refers to multiple values from  one control - you are dealing with multiple.

    If you are dealing with a quiz here, you might consider a table with all the correct answers and do a lookup on the OnChange of each control to see if it is correct, then set a Variable if not. You only then have to test if that Variable is true.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Newbeetle1 Profile Picture
    62 on at

    Hi Warren, many thanks for the idea I will give that a go.

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard