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 / Dropdown list not full...
Power Apps
Unanswered

Dropdown list not fully populating from sql connection

(0) ShareShare
ReportReport
Posted on by 25

HI, can you please assist me with a query. I have a dropdown field pointing at an SQL view but its currently only showing me 2 years. The attached screenshot shows an adjacent gallery connected to the same data source clearly showing the correct year. I'm using the distinct function on the dropdown. Any ideas would be greatly appreciated

 

nmagee_2-1712790943165.png

 

 

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at

    @nmagee 

    There's no information around this but Distinct only return at most 2000 records. This will be why you're not seeing all your data.

     

    You could try creating a View in SQL that does the Distinct action for you and then connect to that View for your Dropdown?

  • nmagee Profile Picture
    25 on at

    is that still the case with sql. though sql supports delegation?

  • EddieE Profile Picture
    4,641 Moderator on at

    @nmagee 

    I'm not sure of your understanding of delegation inside of PowerApps but SQL has more delegable queries available to it (notably Search() ) then say SharePoint but not all functions can be delegated, just because it's SQL.

     

    Basically, if a function isn't inside this table (see link) it's not delegable. Even then, there are restrictions

    eg Dates: you cannot use '>', '<' to check between dates in SQL, you have to setup your 'dates' as numbers

    eg 12/04/2024 as a number is 20240412 - you can then use '>', '<' on this field

     

    https://learn.microsoft.com/en-us/connectors/sql/#power-apps-functions-and-operations-delegable-to-sql-server

     

    A quick check you can do yourself for the Distinct() function is to:

    - add a blank gallery, set layout to 'Title'

    - connect to your SQL table, if you haven't already - make sure this table has a wide range of records to check Distinct against

    - add this Table to the gallery Data Source

    - in the app Settings, set the Data row limit to 5 or some smallish number

    - back in your gallery, use this function for the Items

    Distinct( yourSQLTableName, columnName)

     

    What you will see is that if you are connected to a large table with lots of records and the field you used for columnName has varying values, then the gallery will only display AT MOST 5 records. Galleries done right (eg using Filter) can return ALL the records from a datasource, if the Items function is delegable.

     

    The frustration thing with Distinct is that you don't get a warning to say this and the above method is the only way to check.

     

    The other thing that I find odd about the SQL connector in PowerApps is that Search() is lauded as the must have function when using this data source, and yet you can only use Search() (without delegation issues) on TEXT fields, ie

    EddieE_0-1712870852110.png

     

    Anyway, hope this makes sense. Happy to help further if you need me to.

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 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard