Skip to main content

Notifications

Community site session details

Community site session details

Session Id : sUAqs70P2qrk8xw7eTSzqX
Power Apps - Building Power Apps
Answered

Is it possible to create a quiz with PowerApp with randomly chosen questions from a SharePoint list?

Like (0) ShareShare
ReportReport
Posted on 11 Apr 2019 10:05:48 by 42

I want to create a quiz with 5 questions. My problem is that I can't create a question pool for Microsoft Forms, so i would try with PowerApp. I want to create a SharePoint list with 20-30 questions and answers as a question pool. The goal would be an app which displays 5 randomly choosen questions with answer options from the sharepoint list.

  • Englishweb Profile Picture
    371 on 13 Nov 2019 at 10:55:23
    Re: Is it possible to create a quiz with PowerApp with randomly chosen questions from a SharePoint list?

    Hello John

    This is what I'm hoping to achieve:

    1) I create MyCollection, which collects data OnStart from a datasource (Excel file) to run the app

    2  I use the Patch function to update a 2nd data source (Another Excel file)  

    (Both datasources are connected to the app)

     

    My assumption is that users will NOT need access to both Excel files if the App is running from MyCollection? Am I right? (Sorry if this question is obvious)!

    Are there any problems that you could foresee with this approach?

    Thanks in advance.

  • Prometheus365 Profile Picture
    6 on 13 Nov 2019 at 09:26:58
    Re: Is it possible to create a quiz with PowerApp with randomly chosen questions from a SharePoint list?

    Hi @Englishweb ,

     

    Is your data source SharePoint?  Are you concerned your students can simply browse to the SharePoint list to view the answers?

     

    If so this Community Call could help.  Laura Rogers describes how to security trim a SharePoint list:

     

    https://www.youtube.com/watch?time_continue=1498&v=kVb4E99sxMw

     

    If this isn't your issue then let me know and I will try and help further.

     

    Also, depending on the number of questions and answers you could create collections from tables in OnStart and get rid of any external data source.  Students would never see the collections when playing the app but it would make maintenance a bit more difficult.

     

    Good luck,

    John

  • Englishweb Profile Picture
    371 on 12 Nov 2019 at 18:02:19
    Re: Is it possible to create a quiz with PowerApp with randomly chosen questions from a SharePoint list?

    Hello John

    Thanks very much for taking the time to reply. I will certainly watch your videos.

    My question now is: how to hide the quiz answers from the users (students). So if you have any ideas I would be very interested!

    Thanks

  • Prometheus365 Profile Picture
    6 on 12 Nov 2019 at 13:58:22
    Re: Is it possible to create a quiz with PowerApp with randomly chosen questions from a SharePoint list?

    Hi @Purman ,

     

    Really late to the party here but I've a video series on a quiz app that I created.  I'm sure you've finished your app long ago but just in case you find any of it useful.

     

    https://www.youtube.com/watch?v=qEFEZz-kk8I&list=PL_5RWrZIgHKHV12XPhoAH3C9Su33VbZaG

     

    Good luck,

    John

  • Englishweb Profile Picture
    371 on 29 Oct 2019 at 04:34:10
    Re: Is it possible to create a quiz with PowerApp with randomly chosen questions from a SharePoint list?

    Hello @v-xida-msft 

    Is there a way to hide the questions and answers from the users of the quiz?

    Thanks!

  • Purman Profile Picture
    42 on 15 Apr 2019 at 07:28:16
    Re: Is it possible to create a quiz with PowerApp with randomly chosen questions from a SharePoint list?

    Wonderful, it's working, thank you!

     

    How can I create If function correctly for checking the selected answer radio button? (I have problem with the right side of the logical test)

     

    If(Radio1.Selected.Value = First(FirstN(QuestionCollection, 1)).CorrectAns, Set(Score,1), Set(Score, 0))

    Thank you!

  • Verified answer
    v-xida-msft Profile Picture
    on 15 Apr 2019 at 06:31:40
    Re: Is it possible to create a quiz with PowerApp with randomly chosen questions from a SharePoint list?

    Hi @Purman ,

    The result the FIrstN() function returns is a Table value rather than a Record, please modify your formula as below:

    First(FirstN(QuestionCollection, 1)).Answer1

    Or

    First(QuestionCollection).Answer1

    More details about FirstN function, please check the following article:

    FirstN function

     

    Best regards,

  • Purman Profile Picture
    42 on 15 Apr 2019 at 06:23:41
    Re: Is it possible to create a quiz with PowerApp with randomly chosen questions from a SharePoint list?

    Hi,

     

    i tried preveusly with these lines, but no success.

     

    These are my screens (in the collection the first column is "Answer1"):

    Screenshot (4).pngScreenshot (6).png

    What should i correct? 

     

    Thank you,

    Tamas

  • v-xida-msft Profile Picture
    on 15 Apr 2019 at 01:44:45
    Re: Is it possible to create a quiz with PowerApp with randomly chosen questions from a SharePoint list?

    Hi @Purman ,

    Do you want to display the first question and forth answers from your Collection using FirstN function?

     

    I have made a test on my side, please take a try with the following workround:

    Set the Text property of the Question Label to following:

    FirstN(QuestionCollection, 1).Title

    Or

    First(QuestionCollection).Title

    Set the Text property of the Answer1 Label to following:

    FirstN(QuestionCollection, 1).Answer1

    Set the Text property of the Answer2 Label to following:

    FirstN(QuestionCollection, 1).Answer2

    Set the Text property of the Answer3 Label to following:

    FirstN(QuestionCollection, 1).Answer3

    Set the Text property of the Answer4 Label to following:

    FirstN(QuestionCollection, 1).Answer4

     

    Best regards,

  • Purman Profile Picture
    42 on 12 Apr 2019 at 13:58:00
    Re: Is it possible to create a quiz with PowerApp with randomly chosen questions from a SharePoint list?

    Thanks for the answers!

     

    Now I want to display the first question, and the 4 answers from the collection.

     

    Collection name is "QuestionCollection", question column is "Title", answer columns are Answer1...4.

     

     

    How can I display those with FirstN function in a label?

     

    Thank you!

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 42 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 41 Super User 2025 Season 1

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 36

Overall leaderboard
Loading started