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 / Drop Down menu issue
Power Apps
Unanswered

Drop Down menu issue

(0) ShareShare
ReportReport
Posted on by 1,935 Moderator

Hi all,

 

Trying to fix some problem I'm having with drop down menu.

I have several drop down selections, depending on which one is selected then gallery is filtering through collection if any result matches the "Drop down menu" option. For example drop down menu option = Motors.

If in collection from tab "Line" any have Motors as text then it displays results. 

 

The issue is that If Option All is selected then to ignore filtering but if any other option is selected then to filter gallery.

For now I'm solving this by simply adding OnSelect option = Clear(SearchList); -- Collection

But by this OnSelect it clears all collection every time i click on Drop down menu. Isn't there any better option to prevent to display All results but display other?

Because if I add OnChange option as :

If(And(SearchDropdrown.Selected.Value ="All",IsBlank(SearchBar)),Clear(SearchList), Filter...

Then it still first load the collection and only then clears it. So it takes couple of seconds of loading..

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @Gochix ,

    Yes there is a much simpler way, but you did not include the Items of the gallery. If for instance your SearchDropdown was on the Title field, your filter would be (xxxx the valid output of the dropdown)

    Filter(
     SPListName,
     (Searchdropdown.Selected.xxxx = "All" || Title = Searchdropdown.Selected.xxxx) &&
     YourOtherFiltersHere
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

  • Gochix Profile Picture
    1,935 Moderator on at

    My apologies, here is Item from gallery i used before.

    If(SearchDropdrown.Selected.Value = "All", SearchList,
    Filter(
     SearchList,
     Line = SearchDropdrown.Selected.Value
    )

    SearchDropdown is not on title field but on Line field.

    Can't use it on Title as needed by other data.

     

    Tried to use your formula, it works. The thing is i have more than 6000 rows of data on my collection so whenever i select Dropdown menu option All it loads all 6000 rows. Is there just a way if i select Option = All then it just would ignore and clear the collection? If select any other then show collection.

    Because the issue is only with this Option = All. I don't want to show all rows at once. 

    Gochix_0-1635030561107.png

     

    I did try to use On DropDown menu option Onchange to clear collection if option All is selected, but it first displays the gallery and then clears collection so it's not the right approach.

  • WarrenBelz Profile Picture
    153,117 Most Valuable Professional on at

    Hi @Gochix ,

    I cannot test this, but you could try

    If(
     SearchDropdrown.Selected.Value <> "All" && !IsBlank(SearchDropdrown.Selected.Value),
     Filter(
     SearchList,
     Line = SearchDropdrown.Selected.Value
     ),
     CollectionName
    )

    but to do this, the collection would need exactly the same field structure as the List.

    Also note that OnChange has a nasty habit of triggering when a form is loaded.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Gochix Profile Picture
    1,935 Moderator on at

    Hi @WarrenBelz ,

    Thanks for trying but still loading the whole collection.. Looks like i will just have to stick with old solution to clear the collection every time i select dropdown menu.

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 765 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 272

Last 30 days Overall leaderboard