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 list not show...
Power Apps
Answered

Dropdown list not showing all values from DBO

(0) ShareShare
ReportReport
Posted on by 152

Hello, 

 

I have a dropdown list in my app that displays the distinct values from a collection. The collection simply takes the values from a SQL database.

 

Some users have noted that they can find some rows (we are searching by BatchName) only with the search bar, but the same BatchName is not shown in the dropdown list. See the example below with batch Pilot Plus_07072021_Addition: we can see the two records associated to that batch in the gallery below by entering the batch name in the search bar, but the batch will not show anywhere in the dropdown list. 

 

PilotPlus.png

Alienvolm_1-1625839859818.png

 

 

This is the code for my Screen | OnVisible property: 

 

ClearCollect(collectBatches, {Result: "All"});
Collect(
 collectBatches, 
 Distinct('[dbo].[JourneyUser]', BatchName)
)

 

 

And my dropdown simply calls the collection in the Items property:

 

collectBatches

 

 

Any suggestions? This is very important as any other function in the app works with the list in the dropdown. 

 

Thanks in advance! 

 

~Alienvolm

Categories:
I have the same question (0)
  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Alienvolm Do you have more than 2K records in the database? If so this could be a delegation issue.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @Alienvolm 

    Put

    ClearCollect(
     collectBatches, 
     Distinct('[dbo].[JourneyUser]', BatchName)
    )

    in the OnVisible property of the screen with the dropdown and set the Items property in the dropdown to Search(collectbatches, TextInput1.Text, "Result")  

      

  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Distinct does that some times. In my opinion it's not reliable. I have 2 apps they have same schema. In one of them distinct show all the values. In another it just doesn't show some values. I had to add search bar because of that. Tried posting here once or twice. didn't fix anything. Just replying to get notification if someone answers this.

  • Alienvolm Profile Picture
    152 on at

    Hi @CNT, I just checked, and yes... we have hit 2200 records in the DB. Is there anything that I can do to extend that threshold? 

     

    Otherwise I will have to filter them somehow...

     

    Thanks for the hint! 

     

    ~Alienvolm

  • Verified answer
    CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @Alienvolm 2K is the max. You have 2 options to solve this,

    1. Filter at the source (the better option).
    2. Collect the data into collections in batches of 2K and combine them into one big collection and use that in the Items property of the Combobox.

    From a design perspective I don't think it would be ideal for users to go through a list of 2200 records to find something.

     

    Please remember to give a 👍 and accept the solution as it will help others in the future.

  • Alienvolm Profile Picture
    152 on at

    Thanks @Drrickryp

    This  just proves that the BatchName doesn't make it to the list: 

    Alienvolm_0-1625842475936.png

    There are no batches with that name. 

  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Alienvolm 

    As @CNT says at point one, the most reliable thing to do is to let server do the job. So, use a view in SQL server to prepare the distinct values and in app use this view as source of your dropdown. 

  • Alienvolm Profile Picture
    152 on at

    Thanks, will do! 

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard