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 / Creating a collection ...
Power Apps
Answered

Creating a collection based on Combo Box selection

(1) ShareShare
ReportReport
Posted on by 1,257 Super User 2024 Season 1

1.  A combo box called cbStatus   (multi select)

2.  A sharepoint list called  Staff with an email column (people field) and a status column (single line text) 

 

When I click a button I want to create a collection that is a subset of the sharepoint list with only those rows where the status is equal to the selections in cbStatus (and it's multi select)

 

Tried lots of things and just not getting it !

 

Thanks

 

TIA

 

 

 

 

Categories:
I have the same question (0)
  • anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on at

    hi @vffdd ,

    On your button’s OnSelect property, add the following formula:

     

    ClearCollect(
     colFilteredStaff,
     Filter(
     Staff,
     Status in cbStatus.SelectedItems.Value
     )
    )

     

    If you encounter delegation warnings, which might happen if your SharePoint list is large, you might need to handle it differently. For example, by iterating through the selected values in cbStatus and collecting matching records:

     

    Clear(colFilteredStaff);
    ForAll(
     cbStatus.SelectedItems,
     Collect(
     colFilteredStaff,
     Filter(
     Staff,
     Status = ThisRecord.Value
     )
     )
    );

     

    Make sure the Status column in your SharePoint list and the items in cbStatus combo box have matching values.

  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on at

    Thanks @anandm08 

     

    Unfortunately the first one does give delegation issues . (also I needed to change it slightly as .value is not an option after selecteditems  I have tried that before, and the 2nd one does not work at all for me, again they syntax is not quite right  thisrecord.value is not an option either.  Thanks anyway

  • Verified answer
    WarrenBelz Profile Picture
    154,910 Most Valuable Professional on at

    @vffdd ,

    @anandm08 is almost there with the second one - you just need to use and As statement

    Clear(colFilteredStaff);
    ForAll(
     cbStatus.SelectedItems As _Data,
     Collect(
     colFilteredStaff,
     Filter(
     Staff,
     Status = _Data.Value
     )
     )
    );
  • vffdd Profile Picture
    1,257 Super User 2024 Season 1 on at

    That's it Thanks @WarrenBelz 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard