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 / Populate dropdown item...
Power Apps
Answered

Populate dropdown items from sql by id

(0) ShareShare
ReportReport
Posted on by 534

I'm trying to populate my dropdown with items from a sql table by id.

 

The table...

table.jpg

 

The dropdown settings...

dropdown settings.jpg

The problem is all colors are populating the dropdown.  If the styleID is 2...then only the associated colors with that id should populated the dropdown.  I'm not really sure why this doesn't work.

 

Any help would be kindly appreciated. 

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

    @tonykiefer 

    Please consider changing your Items Formula to the following:

       Filter(BOMS, StyleID=currentRecord.StyleID, Color)

     

    I hope this is helpful for you.

  • tonykiefer Profile Picture
    534 on at

    Hi @RandyHayes...before my current settings I tried that and I got the crazy error "Service call was successful.  However, there was a problem processing the server response."

     

     

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

    @tonykiefer 

    Yes, but you're looking at the Default in your screen shot.

    My point was - "Please consider changing your Items Formula to the following:"  Not the default.  The default should represent the Default that you want selected.

  • tonykiefer Profile Picture
    534 on at

    Hi @RandyHayes,

     

    This is the error.  I hope I'm understanding you.  Before I submitted my ticket this was the way I set up the dropdown.  Here it is again for illustration...

     

    tonykiefer_0-1628703009744.png

     

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

    @tonykiefer 

    I'm concerned in your case that the Color name is being interpreted as the built in Color enum and not your column name.

    To test, change the formula to:

       RenameColumns(Filter(BOMS, StyleID=currentRecord.StyleID, Color), "Color", "_color")

     

    Then change the Value displayed in the dropdown to _color if it did not already change. 

  • tonykiefer Profile Picture
    534 on at

    Hi @RandyHayes ...

     

    It is the same result...

    tonykiefer_1-1628703901306.png

     

     

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

    @tonykiefer 

    Something is wrong at the datasource level.  Make sure you have refreshed the datasource.  If no help, then remove the datasource and then add it back in.  If no help, change the Items property to BOMS and set the display value to Color.  Let's see where that takes you.

  • tonykiefer Profile Picture
    534 on at

    Hi @RandyHayes,

     

    First I refreshed the data source and the same result.  I then removed the data source completely and added it back.  I still get the same result when using these two solutions...

    "

    Filter(BOMS,StyleID=currentRecord.StyleID, Color)

    RenameColumns(Filter(BOMS, StyleID=currentRecord.StyleID, Color), "Color", "_color")

    "

    If I set the dropdown Items property to BOMS and the value to Color, the dropdown will be populated with all colors from the table.  As a test this tells me connecting to the BOM table is working fine.  When I tried to filter it the first time and received that error I didn't know what to do.

     

    So essentially I'm still getting the same errors.  Also...I tried to filter the BOM table using different values and got the same results.  Such as...Filter(BOMS,StyleID=currentRecord.StyleID, BOMType)

     

    tonykiefer_0-1628706513134.png

     

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

    @tonykiefer 

    Okay...one more shell for the shotgun...change the formula to:

       Filter(BOMS,StyleID=2, Color)

     

    Results?

  • tonykiefer Profile Picture
    534 on at

    Hi @RandyHayes...

     

    Sadly...the same result...the same crazy result.

    tonykiefer_0-1628707023482.png

     

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard