cancel
Showing results for
Did you mean:
New Member

## Quiz question - scoring multiple checkboxes

I work in a school and I'm trying to make a quiz. Its a science one and one of the questions is

Which two organs are where digestion of food occurs?

I have 6 answers as checkboxes. How do i score multiple checkboxes?

So far i have

If(Checkbox1.Value = true, Set(Score,1),Set(score,0))

I also want to add 1 to the score if checkbox1_5 is true.

The score,0 is to automatically set the score to 0 on a retake of the quiz.

I am mainly doing quizzes at the moment. If there is any help you can point me in the direction off it would be great. Even though i'm stuck the quiz part seems simple but i wanted a good finish page. Something that shows the overall mark and maybe which answers they gave incorrectly and what the correct answer was

I was hoping for a finish page that showed the score and

1 ACCEPTED SOLUTION

Accepted Solutions
Super User

There are a variety of ways to go about this.  The key will be how to make it manageable in some way.

I have done similar and found that having two labels in the app (doesn't make a difference where), one for correct answers and one for incorrect answers.

Now, let's say you have 6 checkboxes for your digestion question, two are correct and 4 are wrong.  I will call these Checkbox1 through Checkbox6.  Checkbox3 and Checkbox 5 are correct and the rest are wrong.

In the Correct Label you would have the following formula:

``````Sum(
[Checkbox3.Value, Checkbox5.Value],
If(Value, 1, 0)
)``````

In the  incorrect label you would have:

``````Sum(
[Checkbox1.Value, Checkbox2.Value, Checkbox4.Value, Checkbox6.Value],
If(Value, 1, 0)
)``````

Now that you have these labels, they will have the sum of all of the correct and incorrect answers.  You can refer to those labels anywhere you need to get the value - ex.  Value(labelCorrect.Text) would be the number of correct answers.

Anyway, this is just one of many ways.  This one I particularly like because it is relatively simple.

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
Super User

There are a variety of ways to go about this.  The key will be how to make it manageable in some way.

I have done similar and found that having two labels in the app (doesn't make a difference where), one for correct answers and one for incorrect answers.

Now, let's say you have 6 checkboxes for your digestion question, two are correct and 4 are wrong.  I will call these Checkbox1 through Checkbox6.  Checkbox3 and Checkbox 5 are correct and the rest are wrong.

In the Correct Label you would have the following formula:

``````Sum(
[Checkbox3.Value, Checkbox5.Value],
If(Value, 1, 0)
)``````

In the  incorrect label you would have:

``````Sum(
[Checkbox1.Value, Checkbox2.Value, Checkbox4.Value, Checkbox6.Value],
If(Value, 1, 0)
)``````

Now that you have these labels, they will have the sum of all of the correct and incorrect answers.  You can refer to those labels anywhere you need to get the value - ex.  Value(labelCorrect.Text) would be the number of correct answers.

Anyway, this is just one of many ways.  This one I particularly like because it is relatively simple.

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Announcements

#### Power Platform Connections Ep 15 | L. Baybutt | Thursday, 1 June 2023

Episode Fifteen of Power Platform Connections sees David Warner and Hugo Bernier talk to Microsoft MVP Lewis Baybutt aka Low Code Lewis, alongside the latest news and community blogs.   Use the hashtag #PowerPlatformConnects on social media for a chance to have your work featured on the show.      Action requested: Feel free to provide feedback on how we can make our community more inclusive and diverse.  This episode premiers live on our YouTube at 12pm PST on Thursday 1st June 2023.  Video series available at Power Platform Community YouTube channel.    Upcoming events:  European Power Platform conference – Jun. 20-22nd - Dublin Microsoft Power Platform Conference – Oct. 3-5th - Las Vegas  Join our Communities:  Power Apps Community Power Automate Community Power Virtual Agents Community Power Pages Community  If you’d like to hear from a specific community member in an upcoming recording and/or have specific questions for the Power Platform Connections team, please let us know. We will do our best to address all your requests or questions.

#### Microsoft Power Platform Conference | Registration Open | Oct. 3-5 2023

We are so excited to see you for the Microsoft Power Platform Conference in Las Vegas October 3-5 2023! But first, let's take a look back at some fun moments and the best community in tech from MPPC 2022 in Orlando, Florida.   Featuring guest speakers such as Charles Lamanna, Heather Cook, Julie Strauss, Nirav Shah, Ryan Cunningham, Sangya Singh, Stephen Siciliano, Hugo Bernier and many more.   Register today: https://www.powerplatformconf.com/

#### Check out the new Power Platform Communities Front Door Experience!

We are excited to share the ‘Power Platform Communities Front Door’ experience with you!   Front Door brings together content from all the Power Platform communities into a single place for our community members, customers and low-code, no-code enthusiasts to learn, share and engage with peers, advocates, community program managers and our product team members. There are a host of features and new capabilities now available on Power Platform Communities Front Door to make content more discoverable for all power product community users which includes ForumsUser GroupsEventsCommunity highlightsCommunity by numbersLinks to all communities Users can see top discussions from across all the Power Platform communities and easily navigate to the latest or trending posts for further interaction. Additionally, they can filter to individual products as well.       Users can filter and browse the user group events from all power platform products with feature parity to existing community user group experience and added filtering capabilities.     Users can now explore user groups on the Power Platform Front Door landing page with capability to view all products in Power Platform.    Explore Power Platform Communities Front Door today. Visit Power Platform Community Front door to easily navigate to the different product communities, view a roll up of user groups, events and forums.