web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

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

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 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
    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
    68,717 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
    on at

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

     

    @Anonymous 

  • Community Power Platform Member Profile Picture
    on at

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

  • Pstork1 Profile Picture
    68,717 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard