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 / trouble with combo box...
Power Apps
Answered

trouble with combo box loading data

(0) ShareShare
ReportReport
Posted on by 47

I am fairly new to power apps , 

I am trying to create a small db. in teams PowerApps.

Currently , I have a virtual gallery --> connected to a db source in PowerApps. 

I want to create a filter using a choicelist from the db in a combo box. 

 

I try using the following on the choice item 

Choices('DB_Tools_Registers'.MES_Content_type) it does not show the data correctly loading 

 

Here is a screencapture attached. I also have tried filter, or DB.column also have the same issue. 

 

The combo box is blank.  Any help would be helpful

thanks

ga, 

Capture1.PNG
Categories:
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Ga_2004 ,

     

    Could you please share more details about your scenario? What kind of data source are you working on, SQL Server? Would you like to populate the Combo Box in your app with data from the data source?

     

    If you would like to populate the combo box with data in SQL Server, since there is no Choices type column data in SQL data base, you need to retrieve string/number type data from SQL server. So, there are two ways:

    1\ Directly populate the Combo box with single column table which created in Items of the Control and includes all selections you need:

    [“Selection 1”,”Selection 2”,”Selection 3”,”Selection 4”,…]

     

    2\ Use Distinct function to populate distinguish values of the column in SQL Server, and the display field need set to Result:

    Distinct('DB_Tools_Registers', MES_Content_type)

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Ga_2004 Profile Picture
    47 on at

    Hi Jeff, 

    I have used a datatable as the datasource. 

    I was able to populate the data from the datatable as below.  I realize that the commands in teams version is a little different.  Now I need the distinct columns from the field i have selected as below. 

    Is there a way to filter it ? 

    Ga_2004_0-1615126132181.png

     

    thanks

    ga,

     

     

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Ga_2004 ,

     

    I haven't tried that Distinct way in Teams app before, however, Distinct(DataTable, Column) should be the common syntax for the Items property of the Dropdown to retrieve distinguish results from the table. The display field would be Result.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Ga_2004 Profile Picture
    47 on at

    Hi Jeff, 

     

    I have tried this, however since the Combo box I want the Choices data defined in the table this given an error, if i use any other column with Distinct is fine. 

     

    sample of the two distinct feature used on the combo box. 

    Ga_2004_0-1615169485145.pngGa_2004_1-1615169514387.png

     

    Datatable structure has choices for MES_contrenty Type

     

    Ga_2004_2-1615169642219.png

    hope this gives the idea , I want the choices data to be distinct not sure how to convert it and display. 

     

    thanks

    regards, 

    ga,

     

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Ga_2004 ,

     

    If the column type is Choices, then the Items property of Combo Box or Dropdown should be:

    Choices(DataTable.Column)

     

    This would directly retrieve the pre-defined selections from the Choices column.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Ga_2004 Profile Picture
    47 on at

    Hi Jeff, 

    thanks for your patience, I have even tried choices in the beginning after I could not get the data I went to use the datasource and field directly... screenshot below. 

     

    Ga_2004_0-1615171274610.png

    Ga_2004_1-1615171435618.png

     

    The choicelist is showing as  complex datatype is this not supported in teams version of Powerapps or any other better way to retrieve this. ?

     

    thanks

    -ga

     

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Ga_2004 ,

     

    Note that it is a DOT instead of COMA in the middle of Data Table and Column Name.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Ga_2004 Profile Picture
    47 on at

    Thanks for identifying the ., however I get this result .

    Ga_2004_0-1615172631254.png

    When I run the app in preview the combo box is blank.. 

     

    regards,

    ga

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Ga_2004 ,

     

    It's not an error, most time only a hint:

    177.png

     

    Please try:

    1\  save, remove and add the table again.

    2\  save the app and open it to edit.

    3\  check if the Combo box Primary field has been set to Value.

    4\  if it is in an EdifForm, remove the data card then re-add it.

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Ga_2004 Profile Picture
    47 on at

    Hi Jeff, 

     

    I have tried the 1 & 2 points you have mentioned.. but the combo is blank .. with the same warning as shown before 

     

    I have inserted the combo box on the Screen and I do not see it has the Primary field. 

    this is the case with many controls not all the properties I see we have in the teams version.. 

     

    regards, 

    ga 

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

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard