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 / DefaultSelectedItems o...
Power Apps
Suggested Answer

DefaultSelectedItems ofr modern combobox 2026

(0) ShareShare
ReportReport
Posted on by 11
While trying to us a combobox inside a gallery. I am trying to show the default item of the colum by This item. columnname. For this case i used [Lookup(Datasource,columnname=Thisitem.columnname)] to get table output. The intresting thing is that the combobox just takes the first item of the items as default selected. Is this a bug of the new combobox?
I have the same question (0)
  • Suggested answer
    SebS Profile Picture
    4,826 Super User 2026 Season 1 on at
    I would say try one of this approuch

    ComboBox.DefaultSelectedItems =
    Filter(
    Datasource,
    columnname = ThisItem.columnname
    )


    Or 

    With(

    {rec: LookUp(Datasource, columnname = ThisItem.columnname)},
    If(!IsBlank(rec), [rec])
    )

    Should work 
  • Atul Vijay K P Profile Picture
    11 on at
    @SebS I tried this way but unfortunately same result. The interesting part is that if we are using the old combo box its working fine. When i use the latest released combobox(new) its not working. When i use the comboboxcanvas (previous), even using the formula [ThisItem.columnname] works.
     
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    Not a bug
    It seems that  It’s a data structure mismatch issue
     
    Fix by:
    • Using DefaultSelectedItems correctly
    • Ensuring matching schema
  • Atul Vijay K P Profile Picture
    11 on at
    My Data source is a SQL table named Plant data - It consists of 3 columns, Business line, Area, Plant. I am using the combo box inside a gallery. The Items of the gallery is a Dataverse table It contains Plant column along with others. Both the columns as of type text. The datasource of combobox is Filter(SQL,Business line<>"ABC").ItemLabelText is ThisItem.Plant.The defaultselecteditems is [LookUp(SQL, Plant = ThisItem.Plant)].
    I tried all these logics in the comboboxcanvas & it works. Here it taking the first item of the list as default.
  • WarrenBelz Profile Picture
    155,840 Most Valuable Professional on at
    I will add here that if the Items of the Combo Box is
    Filter(
       SQL,
       Business line <> "ABC"
    ).ItemLabelText
    and the Combo Box is a Single Selection then the DefaultSelectedItems should be
    {ItemLabelText: ThisItem.Plant}
     although I cannot see any reference to ItemLabelText in the fields you mention.
  • Atul Vijay K P Profile Picture
    11 on at
    @WarrenBelz Thanks for the reply. What i was trying to explain was the below are the fields that i am filling.
    Data source: Filter(SQL,Business line<>"ABC")
    Item label text: ThisItem.Plant
    Default selected items: [LookUp(SQL, Plant = ThisItem.Plant)]

    Sorry for the confusion.

    But I tried this way you advised. Made the table into single column table (Plant Only) & added default selected as a record. IT WORKED!!!!

    Data source: Filter(SQL,Business line<>"ABC").PLANT
    Item label text: ThisItem.PLANT
    Default selected items: {PLANT: ThisItem.Plant}

    From this experience, I am in the understanding that the items of the combo box should be a single column table & the default selected items should be of type record only & not table.

    Is this right?
  • WarrenBelz Profile Picture
    155,840 Most Valuable Professional on at
    The DefaultSelectedItems structure depends on whether it is a single or multiple selection and/or field. You need to reference the DisplayFields reference (the field name you are displaying in the drop-down) and the field name you are writing to/reading from in the format. In your case, for a Single selection/field. This is technically a Record, but is really a one-Record Table, which a Combo Box expects in its structure.
    {DisplayFieldName: ThisItem.DataSourceFieldName}
    Multiple selection is a Table, but the structure with SQL is not the same as (example SharePoint in a Multi-value choice field)
    ForAll(
       ThisItem.DataSourceFieldName As _Data,
       {DisplayFieldName: _Data.Value}
    )
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like
    Visit my blog
    Practical Power Apps    LinkedIn  
     
     
     
  • WarrenBelz Profile Picture
    155,840 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not.
     
    Please Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn   

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard