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 / Checkbox connected to ...
Power Apps
Answered

Checkbox connected to Multi Selection drop-down

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a multi selection dropdown (Location) connected to Sharepoint with 3 choices ("North America","Europe","Asia-Pacific"). In my powerapps form, i want to have a 'Select All' checkbox which if checked, it will select all 3 values in the dropdown. How could i do this? I have run out of options. Thanks

Annotation 2019-08-13 082234.png
Categories:
  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    So here's the process that works for me.

    1) set a variable called AllItems to True in the ONChecked property of the checkbox and False in the OnUnchecked.

    2) set the defaultselectedItems property of the ComboBox to

    If(allitems,collection,Table())

    This works when the datasource is a collection, but not when using a regular datasource. What its really looking for in the defaultselectedItems is a comma delimited list of the item names.

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Is the Location field a Chioce type column in your SP List?

    Do you enable "Allow Multiple selections" option for the Location field in your SP list?

    Further, do you want to select all option values within the Location ComboBox when you check the checkbox?

     

    I assume that the Location field is Choice type column in your SP List, and you have enabled "Allow Multiple selections" option for it. I have made a test on my side, please take a try with the following workaround:1.JPG

    Add a Checkbox within the Location Data card, set the OnSelect property of the "Checkbox" control to following:

    If(
      Checkbox1.Value,
     Set(SelectAll, true),
     Set(SelectAll, false)
    )

    Set the Items property of the Location ComboBox to following:

    Choices('YourSPList'.Location)

    Set the DefaultSelectedItems property of the Location ComboBox to following:

    If(
      SelectAll,
     Table(
     {
     Value: "North America"
     },
     {
     Value: "Europe"
     },
     {
     Value: "Asia-Pacific"
     }
     ),
     Parent.Default
    )

    Please check the GIF screenshot for more details:Test.gif

     

    Best regards,

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    I agree with all @v-xida-msft comments.

     

    But I would suggest one change.  Rather than using an IF statement in the OnSelect just add the True and False settings for the variables to the OnCheck and OnUncheck methods respectively..  That way you don't need an IF

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Anonymous how are you progressing with this? Were the above replies helpful?

     

    @Anonymous 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    wow thank you guys!! Last question, how do i clear the variable? I like clearing them onhidden 

  • Pstork1 Profile Picture
    69,665 Most Valuable Professional on at

    You can set a Variable to Blank, which will clear the value, but there is no way I know of to delete the variable entirely once you set it.

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

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard