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 / Drop Down Not Working
Power Apps
Unanswered

Drop Down Not Working

(0) ShareShare
ReportReport
Posted on by 82

Hi everyone. I am trying to filter a gallery based off a drop down list. 

 

The drop down is populated by a collection when the screen is visible using the following code: ClearCollect(collectCO, Sort(Distinct(Table13,'CO Number'),Result,Ascending))

 

I have a gallery that I want to filter for the item selected in the drop down. It works when I use the following code but is giving me a delegation error around || : 

Filter(Table13,('CO Number' = drpCO.Selected.Result || drpCO.Selected.Result = Blank()))

 

When I change the code to Filter(Table13,('CO Number' = drpCO.Selected.Result)), it gives me a red X. I have been following tutorials online and it always works fine for them. Can anyone help point me in the right direction? 

 

Thanks.

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @mglemser 

    Please consider changing your Formula on the Dropdown to the following:

    Sort(Distinct(Table13, 'CO Number'), Result)

     

    Then set your Gallery Items property to:

    Filter(Table13,
     IsBlank(drpCO.Selected.Result) || ('CO Number' = drpCO.Selected.Result)
    )

     

    I hope this is helpful for you.  If not, let me know what type of column 'CO Number' is in your list and what datasource you are using.

  • mglemser Profile Picture
    82 on at

    Hi Randy. Thanks for the response. I am trying to avoid "or" statements in the filter to avoid a delegation error. Is there a way I can rewrite the filter so it doesn't have || ?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @mglemser 

    Or statements are delegable! What you are Or'ing impacts delegation potential, but not the fact that you OR or AND in the formula.  There is no need to avoid them.

  • mglemser Profile Picture
    82 on at

    I am receiving the following delegation warning when I use the "or" statement. I don't need the gallery filter to account for when the drop down is blank because I want the user to select a drop down value before the data is displayed. 

    mglemser_0-1640880330886.png

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @mglemser 
    The formula I provided is delegable to most all delegable datasources...what datasource are you using?

  • mglemser Profile Picture
    82 on at

    I am using Excel.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @mglemser 

    Ah, the dreaded Excel!  

    Delegation doesn't make a difference when you are using Excel because nothing is delegable to Excel.  So the fact that you have a warning is not that relevant as nothing else that you put in will delegate either.  Excel is file based, so there is no "service/server" to submit a delegable query to.  So, PowerApps has to deal with the maximum number of rows that it can from the file at a time.

    So...you would need to just ignore this warning as there is no way to write delegable criteria to the Excel connector.

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard