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 / Dropdown not updating ...
Power Apps
Answered

Dropdown not updating with changes to database

(0) ShareShare
ReportReport
Posted on by 4

Hi All, I have what seems like a straightforward problem, but I can't figure it out (I'm quite new).

 

I've got a dropdown as part of a larger form, which gets captured later and sent to my SQL database. The available options are given just by doing "Distinct('[dbo].[material]', category)" to offer the available categories.  It mostly works.  The problem is, when I add materials in the database (from the back end, not in my interface) with brand new categories, they never show up in the dropdown.  They DO show up just below where I have search functionality.

 

It's got me really scratching my head as to why database changes don't reflect here.  Some cache behavior?  I've refreshed using Refresh() and a couple other things, but no dice.

 

Thanks for the help.

Categories:
I have the same question (0)
  • Verified answer
    mdevaney Profile Picture
    29,991 Moderator on at

    @baumana

    The DISTINCT function is to blame here.  DISTINCT cannot be delegated so it only looks through the first 2,000 rows of the database and finds the unique values within that range.

     

    Since you are using SQL you could likely create a SQL view to find the unique values and read that into your dropdown instead.  The only downside of using SQL views is you cannot write data to them in PowerApps only read.  But for your use case that would not likely be a problem.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @baumana ,

    How many records existed in your '[dbo].[material]' table? More than 2000?

     

    Actually, it is an known issue within PowerApps -- When you made some changes into your data source, the changes would not take effect immediately within your canvas app. You need to refresh the data source manually within your app to apply the changes into your app or execute the Refresh() function to refresh data source in your app.

     

    In addition, the Distinct function is a Non-Delegable function in PowerApps. In other words, this function could only process 2000 records at most from your SQL Table. Please make sure you have set the "Data row limit for Non-delegable query" option to maximum value -- 2000 within Advanced settings of App settings of your app.

     

    In order to get rid of the Delegation issue within your app, please consider create a SQL View based on your '[dbo].[material]' table, then add this SQL View as data source in your app. Then set the Items property of the Category Dropdown to following:

    Distinct('[dbo].[materialSQLView]', category)

    Note: The SQL View would not be subject to the Delegation issue limits

     

    Best regards,

  • baumana Profile Picture
    4 on at

    I've got just over 500 rows (currently) in my database, so new entries were beyond the delegable limit. Nothing like getting bit by something to really learn it!

     

    Anyway, creating a view and just referencing that was a perfect and easy fix.

     

    Thanks all!

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard