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 / Build a PowerApp Quiz ...
Power Apps
Unanswered

Build a PowerApp Quiz with random questions from SharePoint list

(0) ShareShare
ReportReport
Posted on by 21

Hello, 

Please help me in order to create a PowerApp Quiz with some questions from a Sharepoint List (Questions, Answer 1, Answer 2, Answer 3, Answer 4, Correct Answer ). As requirements:
- To randomly choose 10 questions from that list. Different every time (maybe even a progress bar, if it's not too complicated and timed, for example, 30 min)  ; 

- To list the end results and share them in other Sharepoint List;

- To not be able to get back to the previous question;

Questions are simple, all in this format (Questions, Answer 1, Answer 2, Answer 3, Answer 4, Correct Answer ) with a single correct answer.

So I think I will need 3 screens (A welcome one and a button to redirect to the second one with questions and the last with the results ). 

 

Thanks in advance for your help

Categories:
  • PowerNuggets Profile Picture
    360 on at

    Hi @Claudiu1 

     

    Check below links should be helpful to build your app

     

    getting a random item set from a collection

    https://powerusers.microsoft.com/t5/Building-Power-Apps/getting-a-random-item-set-from-a-collection/td-p/120048

     

    Design Patterns
    https://powerusers.microsoft.com/t5/Community-App-Samples/Design-Patterns-from-Mr-Dang-Part-2/m-p/198929

     

    How to build a quick power app
    https://www.youtube.com/watch?v=8H3ID62xPdc

     

     

    Hope that helps
    _____________________________________________________________________________________
    Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.

     

    MD

  • Claudiu1 Profile Picture
    21 on at

    Thank you,

    But I wanted more than that, I was wondering if I will be able to go through all of these steps:

    • load all the questions from the SharePoint list (in memory)
    • add a column to the in-memory list, set a random number in the column, sort the list by that column, take the top 10 questions (as in the link above)
    •  display the question with the answer options, a button with "Next"
    • have a counter variable that starts at the value of 1
    • when clicking "Next", display the next question (in the same screen) and increase the counter with 1
    • when the counter reaches 10 and the "Next" button is clicked, navigate to the final screen and record the results in a different SharePoint list
  • Claudiu1 Profile Picture
    21 on at

    Hello,

    I've managed to use the "Employee Engagement Survey" template, which is exporting the results in the "Responses" tab on an Excel file from one drive with this:
    If(
    !IsBlank(LookUp(Responses, Username = User().FullName).Username),
    UpdateIf(
    Responses,
    Username = User().FullName,
    {
    ResponseId: ResponseId,
    Answer1: If(
    Radio1_5.SelectedText.OptionText = "No",
    "No," & TextInput1_4.Text,
    Radio1_5.SelectedText.OptionText
    ),
    Answer2: If(
    Radio1_4.SelectedText.OptionText = "No",
    "No," & TextInput1_3.Text,
    Radio1_4.SelectedText.OptionText
    ),
    Answer3: If(
    Radio1_3.SelectedText.OptionText = "No",
    "No," & TextInput1_2.Text,
    Radio1_3.SelectedText.OptionText
    ),
    Answer4: If(
    Radio1_1.SelectedText.OptionText = "No",
    "No," & TextInput1.Text,
    Radio1_1.SelectedText.OptionText
    ),
    Answer5: If(
    Radio1_2.SelectedText.OptionText = "No",
    "No," & TextInput1_1.Text,
    Radio1_2.SelectedText.OptionText
    )
    }
    ),
    UpdateContext(
    {
    NewSurvey: Patch(
    Responses,
    Defaults(Responses),
    {
    ResponseId: Text(CountRows(Responses) + 1),
    Answer1: If(
    Radio1_5.SelectedText.OptionText = "No",
    "No," & TextInput1_4.Text,
    Radio1_5.SelectedText.OptionText
    ),
    Answer2: If(
    Radio1_4.SelectedText.OptionText = "No",
    "No," & TextInput1_3.Text,
    Radio1_4.SelectedText.OptionText
    ),
    Answer3: If(
    Radio1_3.SelectedText.OptionText = "No",
    "No," & TextInput1_2.Text,
    Radio1_3.SelectedText.OptionText
    ),
    Answer4: If(
    Radio1_1.SelectedText.OptionText = "No",
    "No," & TextInput1.Text,
    Radio1_1.SelectedText.OptionText
    ),
    Answer5: If(
    Radio1_2.SelectedText.OptionText = "No",
    "No," & TextInput1_1.Text,
    Radio1_2.SelectedText.OptionText
    )
    }
    )
    }
    )
    );
    Navigate(Finish_Screen, ScreenTransition.Fade)
    But I have two questions:
    1. how do I calculate the percentage of correct answers? ( also If I can display the score at the end )
    I have inserted in the Options tab ( answers tab see the screenshot ) the OptionId 5 which is the correct answer.

    2. How to randomize the questions (based on QuestionId) and corresponding answers?




    Answers.jpg
    Questions.jpg

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard