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 / Display collection val...
Power Apps
Answered

Display collection values in dropdown?

(0) ShareShare
ReportReport
Posted on by

Hello, 

 

I'd like to display the values of a Collection, inside Dropdowns rather than Text Boxes. This is so a User can edit a record in the Collection and only choose from specific values when editing. 

 

Heres the collection: 

dropdownCollection2.png

When I set the Dropdown value to ThisItem.value (just like a Text box), the Dropdowns remain blank. 

dropdownCollection.png

 

Is it possible in PowerApps to show the value of a Collection in a Dropdown? 

 

Thanks

Categories:
I have the same question (0)
  • RusselThomas Profile Picture
    4,014 on at

    Hi ericonline,


    I often use dropdowns to control input into plain text columns - makes the data source so much flatter and easier to manage.

    The dropdown control accepts arrays as hardcoded options for the dropdown, so

     

    Items property on dropdown:

    ["option 1", "option 2", "option 3"]

    The default value of the dropdown can then be what the current recorded value of the field is, as long as it's part of that array it will display - assuming you're only using this control to capture data, this should always be the case.

     

    Default property on dropdown:

    ThisItem.ColumnName

     

    If you want the options to be more dynamic (as in, coming from the column itself, or another data source) this is also easy enough.  Let me know if this helps, otherwise we can explore a bit more 🙂

     

    [edit]

    Reading your question, it might be worth adding this piece;

     

    If you want the values to come from the existing collection itself, change the Items property function as follows;

    Distinct('Source', ColumnName)

    and set the Value sub-field to Result if it doesn't do it automatically.  The default value can stay as mentioned above. 

    This will create a dropdown of existing values - just bear in mind you may encounter delegation issues (and take a performance hit) if the query has to return a full 500 rows before determining the Distinct values of those 500 rows. 

    If you know what your values need to be, better to hard code them, or fetch them from a lookup list/column somewhere that is unlikely to change.

     

    Kind regards,

     

    RT

  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @ericonline,

     

    Could you please share a bit more about your app's configuration?

    Is the Edit form connected to the Collection (colWorkSummary)? 

    Further, do you want to display event_type value of the Collection within the Select Type Drop down control and display event_detail value of the Collection within the Select Detail Drop down control?

     

    I have made a test on my side, please take a try with the following workaround:5.JPG

     

    6.JPG

     

     

    Set the OnVisible property of the Screen to following formula:

    ClearCollect(
    colWorkSummary,
    {
    comments:"No comments",
    event_detail:"Ditching",
    event_type:"Production",
    hours2:"08",
    id:1,
    minutes:"00"
    },
    {
    comments:"No comments",
    event_detail:"Ditching1",
    event_type:"Development",
    hours2:"12",
    id:1,
    minutes:"30"
    }
    )

    Set the Items property of the SelectType Drop down control to following formula:

    Distinct(colWorkSummary,event_type)

    Set the Items property of the SlectDetail Drop down control to following formula:

    Distinct(colWorkSummary,event_detail)

     

    On your side, please take a try to set the Default property of the Select Type Drop down control to following formula:

    ThisItem.event_type

    Set the Default property of the Select Detail Drop down control to following formula:

    ThisItem.event_detail

    Or

     

    Set the Items property of the Select Type Drop down control to following formula:

    Distinct(colWorkSummary,event_type)

    Set the Items property of the Select Detail Drop down control to following formula:

    Distinct(colWorkSummary,event_detail)

     

    Best regards,

    Kris

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard