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 / How to check the store...
Power Apps
Answered

How to check the stored value in collection in string value

(0) ShareShare
ReportReport
Posted on by 74
Hi, 
 
I am creating a quiz application in Powerapps. 
 
In my submit code. 
 
ForAll(
    GCGIntranetQuizGal.AllItems,
    Collect(
        colRadio,
        {
            Radio: ThisRecord.Radio4.Selected.Value,
            Question: ThisRecord.QuestionNumber
        }
    )
)
 
I will get the selected value of Radio then I will check if the stored value of is equal to the answers. 
 
Sample: 
 
This is my stored value in collection called colRadio
Then I will compared the Radio column to text "DMS", "DMS", "APPLICATIONS". 
 
Is it possible ? 
 
Thank you
I have the same question (0)
  • Suggested answer
    scalca Profile Picture
    254 Moderator on at
    you need to have somewhere the correct results and then compare it to what has been selected
     
    for example
    ClearCollect(colResult, ForAll(colQuestionResults, {question: ThisRecord.Question, result: If(answer= LookUp(colRadio, Question=ThisRecord.Question).Radio, "correct", "wrong")}))
  • Verified answer
    CU17091722-0 Profile Picture
    21 on at
    Hello,

    To compare the user's selected answers to the correct ones, you would need to have another collection or data source that contains the correct answers for each question. For example, you could have a collection colCorrectAnswers that

    ClearCollect(
        colCorrectAnswers,
        { Question: 1, CorrectAnswer: "Option1" },
        { Question: 2, CorrectAnswer: "Option3" },
        { Question: 3, CorrectAnswer: "Option2" }
    )

    And after y
    ou can then use a ForAll loop LookUp function
     
    ClearCollect(colResults,
        ForAll(
            colRadio,
            {
                Question: Question,
                UserAnswer: Radio,
                CorrectAnswer: LookUp(colCorrectAnswers, Question = ThisRecord.Question).CorrectAnswer,
                IsCorrect: If(Radio = LookUp(colCorrectAnswers, Question = ThisRecord.Question).CorrectAnswer, true, false)
            }
        )
    )

     
  • daywalker_567 Profile Picture
    74 on at
    Hi, 
     
    May I request also on how to make the scoring in this quiz application ? 
     
    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

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard