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 / Selecting default valu...
Power Apps
Answered

Selecting default values in Combobox from String

(0) ShareShare
ReportReport
Posted on by 95

I am trying to preselect items in a combo box based on a string.  The string is stored in a variable called TeamMemberText and has the following value

 

Kamy Tahmasbi, Ali Nazarzadeh

 

When I try try to load the values as default, the text shows up, but the items are not selected.

 

RenameColumns(Split(TeamMembersText,", "),"Result","Value")

 

ComboBox.png

 

Any thoughts?

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @haniel 

    First, I hope you are referring to the DefaultSelectedItems property (DSI) and not the Default property.  Default does nothing in a combobox.

     

    Next, the DSI property must provide records that match the schema of the Items property.  Your current DSI is only going to provide a table of records with a Value column...is that what you have for the Items property?

     

     

  • haniel Profile Picture
    95 on at

     Hi @RandyHayes ,

     

    Thanks for your prompt reply.  Yes, I'm using the DSI property.  In terms of the schema, I'm only providing the Value.  Where can I get the full schema?

     

    -Haniel

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

    @haniel 
    What is your Items property formula?

  • haniel Profile Picture
    95 on at

    'Team Members'

     

    This is the name of a SharePoint list I'm using to populate the CB.

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

    @haniel 

    Then you will want to narrow the table schema.  Using the list as your datasource is going to give you a record schema that has all of your columns as well as all of the built-in SharePoint columns.  So, to match the DSI, you would need to provide the entire record from the list.  That is most likely not necessary if you just narrow the table.

     

    So, for example 'Team Members' is a table with records with all columns.  'Team Members'.Title would be a table with records with only a Title column.

    If the Title column is where you are getting the team member name from, then just go with that, otherwise, change the .Title to the column that contains the value you want.

     

    THEN, in the DSI, your formula would change to:

    RenameColumns(
     Split(TeamMembersText,", "),
     "Result", "Title"
    )

    Again, replace "Title" above with the appropriate column name from your items property.

     

    That should match selections!

  • haniel Profile Picture
    95 on at

    Thanks @RandyHayes .  Changing the Value to Title did the trick.

  • DragonLord Profile Picture
    200 on at

    Getting error "The specified column "Result" does not exist?

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard