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 Apps
Answered

ListBox Selections

(0) ShareShare
ReportReport
Posted on by 728

I am creating a question where the user is to select 5 of the 8 options that are displayed in a listbox.  I would like a formula that would let me know they have selected the correct 5 options.

 

So far, i have created a text box that concats the responses:

 

 

Concat(ListBox1.SelectedItems, Value & ",")

 

 

I also have another textbox that i have added formula to:

 

If(
 "2. try to speak naturally, but clearly and audibly." in Label15.Text && "3. use pauses, emphasis and changes in pace to keep your presentation lively." in Label15.Text && "5. recap where necessary." in Label15.Text && "6. vary your tone; don't talk in a monotone zzzzzzzzz" in Label15.Text && "8. speak to all of the audience, not just to one person or to the floor." in Label15.Text && Not("1. use distracting mannerisms such as 'ems' and 'ers', jingling coins in your pocket etc." & "4. hide behind bits of paper." & "7. talk too fast to get it over with quickly." in Label15.Text),
 "Correct","Wrong"
)

 

 

 

Currently, when the 5 correct options are selected on, it displays as "Correct", however, when i select the remaining 3 options, it still displays as "Correct".

 

I had thought about putting in the textbox containing the Concat formula:

 

If(

 Concat(ListBox1.SelectedItems, Value & ",") = "2. try to speak naturally, but clearly and audibly.,3. use pauses, emphasis and changes in pace to keep your presentation lively.,5. recap where necessary.,6. vary your tone; don't talk in a monotone zzzzzzzzz,8. speak to all of the audience, not just to one person or to the floor.,",

 "Correct", "Wrong"

)

 

However, the items, when selected, wont necessarily be in the exact same order as i have listed so would display as Wrong.  Is there way i could amend this formula so that it would display as correct if it contains all items I have listed?

 

Hope that makes sense

 

 

Categories:
  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @neill_long I'll show you a much easier and efficient way to do this,

    1. Create a collection, ClearCollect(myQuestions, Table({Question:"Q1", isCorrect:true}, {Question:"Q2", isCorrect:false}, {Question:"Q3", isCorrect:true}))

    2. Put the following formulas in the controls,

    ComboBox.Items : myQuestions

    Label.Text: If(false in ComboBoxAnswers.SelectedItems.isCorrect, "Wrong", "Correct")

     

    Hope this helps.

  • neill_long Profile Picture
    728 on at

    @CNT thanks for this. Works perfectly

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @neill_long Glad to help! 🙂

     

    Please remember to give a  👍 and accept the solution as it will be help others in the future.

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 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard