cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Paul13
Level: Powered On

Trying to use the Score function with Radio controls

Hi Guys,

 

I came accross this youtube video that shows you how to Score a quiz using a radio control. However when I type in Score it does not appear below the function line and is not recognised as a function like in the video https://www.youtube.com/watch?v=RisTtTc9aOY go to time 23:20 in the video.

 

Any ideas how to make this score function work?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Trying to use the Score function with Radio controls

Hi @Paul13 ,

Do you want to calculate the Score based on the Radion selected value?

Do you want to use the Score variable to store the Score value?

 

Based on the formula that you mentioned, I think there is something wrong with it, please consider modify your formula as below:

If(
Radio3.Selected.Value = "Terrible",
Set(Score, Score + 1),
Radio3.Selected.Value = "Bad",
Set(Score, Score + 2),
Radio3.Selected.Value = "OK",
Set(Score,Score + 3),
Radio3.Selected.Value = "Good",
Set(Score, Score + 4),
Radio3.Selected.Value = "Great!",
Set(Score,Score + 5)
);

Or

Switch(
           Radio3.Selected.Value,
           "Terrible", Set(Score, Score + 1),
"Bad", Set(Score, Score + 2),
"OK", Set(Score, Score + 3),
"Good", Set(Score, Score + 4),
"Great!", Set(Score, Score + 5)
)

Please take a try with above solution, check if the issue is solved.

 

More details about Switch function, If function, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
PowerApps Staff CarlosFigueira
PowerApps Staff

Re: Trying to use the Score function with Radio controls

In the video you mentioned, the Score is used as a variable, not as a function. That variable is first defined around 19:15 in the video (on the screen for the first question), and it is incremented in the subsequent questions if the user chooses the correct answer.

Paul13
Level: Powered On

Re: Trying to use the Score function with Radio controls

Thanks Carlos,

I am now trying to build a quiz so there is a different score for each value. There are 5 options per question: Terrible = 1 point, Bad = 2 points, OK = 3 points, Good = 4 points and Great = 5 points.

Sorry I am new to this and can't figue out what I am doing wrong.

 

If(Radio3.Selected.Value, "Terrible", Set(Score,1),"Bad", Set(Score,2),"OK", Set(Score,3),"Good", Set(Score,4),"Great!", Set(Score,5));

 

Any advice would be amazing!

Community Support Team
Community Support Team

Re: Trying to use the Score function with Radio controls

Hi @Paul13 ,

Do you want to calculate the Score based on the Radion selected value?

Do you want to use the Score variable to store the Score value?

 

Based on the formula that you mentioned, I think there is something wrong with it, please consider modify your formula as below:

If(
Radio3.Selected.Value = "Terrible",
Set(Score, Score + 1),
Radio3.Selected.Value = "Bad",
Set(Score, Score + 2),
Radio3.Selected.Value = "OK",
Set(Score,Score + 3),
Radio3.Selected.Value = "Good",
Set(Score, Score + 4),
Radio3.Selected.Value = "Great!",
Set(Score,Score + 5)
);

Or

Switch(
           Radio3.Selected.Value,
           "Terrible", Set(Score, Score + 1),
"Bad", Set(Score, Score + 2),
"OK", Set(Score, Score + 3),
"Good", Set(Score, Score + 4),
"Great!", Set(Score, Score + 5)
)

Please take a try with above solution, check if the issue is solved.

 

More details about Switch function, If function, please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 142 members 4,441 guests
Please welcome our newest community members: