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 / Quiz score going over ...
Power Apps
Unanswered

Quiz score going over the max score

(0) ShareShare
ReportReport
Posted on by 13

Can someone take a look at my code please and tell me what I'm doing wrong. 

I have 5 questions with radio buttons. Questions are on separate pages. When user clicks next it takes them to the next question. On the page after the quiz there is a text label that shows score out of 5. For some reason the quiz allows the user to score over 5. I have a previous button for the user to click in case they need to go back and change an answer. Not sure what I'm missing to make this work. Any suggestions would be appreciated.

App OnStart = 

Reset(radQ1);
Reset(radQ2);
Reset(radQ3);
Reset(radQ4);
Reset(radQ5);
Reset(txtInputQ5)

 

Next button OnSelect = If(radQ1.Selected.Value=“Answer blah blah",Set(Score,1),Set(Score,0))

Next button OnSelect = If(radQ2.Selected.Value="Answer blah blah",Set(Score,Score +1))

Next button OnSelect = If(radQ3.Selected.Value="Answer blah blah",Set(Score,Score+1))

Next button OnSelect = If(radQ4.Selected.Value=“Answer blah blah“Set(Score,Score+1))

Next button OnSelect = If(radQ5.Selected.Value="Answer blah blah",Set(Score,Score +1))

Text label text = "You answered " &Score&" out of 5 questions correctly."

Categories:
I have the same question (0)
  • turnerj3 Profile Picture
    2,039 on at

    If you go back, but already had the correct answer and don’t change it, your code will add another on select

  • turnerj3 Profile Picture
    2,039 on at

    On back button select

    If(selectedvalue=correctvalue,Set(Score,Score-1)) for each page.

  • Shaheer Ahmad Profile Picture
    2,194 Moderator on at

    Try:

    Next button OnSelect = Set(Score,0);If(radQ1.Selected.Value=“Answer blah blah",Set(Score,Score+1))

    Next button OnSelect = If(radQ2.Selected.Value="Answer blah blah",Set(Score,Score +1))

    Next button OnSelect = If(radQ3.Selected.Value="Answer blah blah",Set(Score,Score+1))

    Next button OnSelect = If(radQ4.Selected.Value=“Answer blah blah“Set(Score,Score+1))

    Next button OnSelect = If(radQ5.Selected.Value="Answer blah blah",Set(Score,Score +1))

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard