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 use filer() and...
Power Apps
Answered

How to use filer() and GruopBy in the app.

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am building an app that will group tools by model number and populate the combo box with Model number.

Once user chooses the model number from the drop down list, it will populate the Tools List Box (for that model only, one model many tools).

 

What I have done so far is added a data source that is SharePoint list. Then added a button and OnSelect I created the collection by this line of code ClearCollect(xyz,GroupBy(ToolsMasterVersion1,"ModelNumber","Name")) then set the combo box Items property to XYZ.

 

How can I populate the Tools list box with the "Name" for the selected tool from the drop down control?

 

Is there any better way to achieve this rather than use clearCollect and a command button? I tried to use ClearCollect onStart of screen but it is not allowed. ClearCollect working only with actionable control like button.

 

GroupBy.PNG
Categories:
  • Verified answer
    Shanescows Profile Picture
    2,218 Most Valuable Professional on at

    If I understand your question at least part of it is answered by this video PowerApps Cascading Dropdown start there and then let me know if I can be of more help. 

  • Verified answer
    aprildunnam Profile Picture
    704 on at

    If I'm understanding correctly I think you can get rid of the command button.  If you just want your Tool list box to only show tools that match the item number then you can set the Items property of your Tool List Box to be filtered according to the Model # Dropdown Value.  You would use the Distinct and Filter functions similar to the following:

     

    Distinct(Filter(Tools,Model = ModelDD.Selected.Value),Tool)

     

    So you would pass in the name of your data source first then you put in your filter condition (where model equals my selected model) and then tell it what field to return (tool name).

     

    I made a blog post on this not too long ago that walks through this in more detail:

     

    http://www.sharepointsiren.com/2018/03/cascading-dropdowns-in-powerapps.html

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    Thanks to both of you. I will implement the solution and keep you posted. ShaneCows: I watch your video and it has been very useful in implementing the solution.
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at
    It worked just fine. Thanks to both of you. I might be back with more question if needed.
  • aprildunnam Profile Picture
    704 on at

    Glad to hear it worked!

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard