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 / Set DefaultSelectedIte...
Power Apps
Answered

Set DefaultSelectedItem and Items in combobox from 2 different table

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone,


I have a form in which there is one combobox so i want to update the name. I want to use only one combobox here. Now on Collection named "ModifyProject" I have one single row and name is in column "project_lead", so by default in defaultselecteditem property in combobox it should show the name. And in items property it should have list of all the name from database.

So this is what I have did:
In Items Property: 

'[dbo].[AzureADGroupsTable]'

I have wrote this and selected Field as name. Here I am getting all the results. No issue here.

In DefaultSelectedItems Property:

ModifyProject.project_lead

In here I am taking the name directly from the Collection ModifyProject.  As you can see img 3, it shows nothing, not even throwing error.

Please help , Here i want defaultselectedItem should have name. It shows nothing right now.

Thank you.

2.PNG
3.PNG
Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    The DefaultSelectedItems property (DSI) of a Combobox expects a Record or Table of Records (depending on the settings of the combobox).  

    The Record schema of the provided record MUST match the schema of the Items property.

     

    In your case you are setting the Items to an entire table - which will be a table of records with a schema based on the schema of [dso].[AzureADGroupsTable].

    Then your DSI is set to a table with a single column schema with each column, most likely, containing a text value.  This will never match!  It will give you an error but it will not match.

     

    I do not know what dependencies you have on the Combobox selected items, but if you are ONLY utilizing the displayname column values, consider changing your Items property to:    

    ShowColumns('[dbo].[AzureADGroupsTable]', "displayname")

     

    Now, for your DSI property...you need to reference a single record in your ModifyProject table.  Currently you are referencing the entire table and thus you will get an entire table, which again will not match.

    So, once you determine how you will get to a single record in that table based on your App (I'd recommend approaches, but I do not know your scenario at this point) then you can use that in the DSI.

       {displayname: yoursingleprojectrecord.project_lead}

    The above will give you a proper selection in the combobox.

     

    I hope this is helpful for you.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much. You saved my day 🙂

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard