Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Filter the gallery with dropdown box to show all data or only selected numbers

(0) ShareShare
ReportReport
Posted on by 158

Hi, 

I am beginner in PowerApps and just creating my 2nd App now. I have added a dropdown box which shows me values from the gallery. My question is how I can add a blank row in dropdown box or row with option "All" values so the gallery shows me all rows and not only selected from dropdown box, please?  

 

Thanks!

  • MP-13011217-0 Profile Picture
    MP-13011217-0 158 on at
    Re: Filter the gallery with dropdown box to show all data or only selected numbers

    Hi, sorry I just tried it but also added another line onVisible: Collect(colPartNumber, Distinct(Table5, 'PART NUMBER')), then saved, published and closed app. I opened it and it's working! 🙂 thank You for Your response was really helpful! 

  • MP-13011217-0 Profile Picture
    MP-13011217-0 158 on at
    Re: Filter the gallery with dropdown box to show all data or only selected numbers

    Thank You very much! Now it is not showing any error but also not showing any data in my gallery and dropdown box... any idea why? 

  • Verified answer
    Re: Filter the gallery with dropdown box to show all data or only selected numbers

    Hi @marcy_pi,

    Do you want to display all the records if you select "All" option from the dropdown?

    First of all, add the "All" option to the dropdown list. To achieve this, you should create a collection to add the All option, you could create the collection clicking a button or set the OnVisible of the current screen:

    ClearCollect(colPartNumber,{Result:"All"},Distinct(Table5, 'PART NUMBER'))

    Then populate the dropdown part number with the colPartNumber, there will exist "All".

    Set the Items property of the Gallery as below:

    If(Dropdown_PartNumber.Selected.Result="All",Table5,Filter(Table5,'Part Number'=Dropdown_PartNumber.Selected.Result))
  • Jasir Qadri Profile Picture
    Jasir Qadri 36 on at
    Re: Filter the gallery with dropdown box to show all data or only selected numbers

    You have to create the collection and store the fields in that and then apply  

  • MP-13011217-0 Profile Picture
    MP-13011217-0 158 on at
    Re: Filter the gallery with dropdown box to show all data or only selected numbers

    Thank You for a quick reply. I already have one command there which is: Distinct(Table5, 'PART NUMBER'). How do I apply Your code to that, please? 

  • Jasir Qadri Profile Picture
    Jasir Qadri 36 on at
    Re: Filter the gallery with dropdown box to show all data or only selected numbers

    Go to Dropdown ,items and put [blank(),"ALL","Value","Value"] and other dropwdown values which you want to show.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard