Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Default Selected Items for Combobox

(1) ShareShare
ReportReport
Posted on by 39
How can I set the default selected items of a combobox to display the results stored in the sharepoint list ? 
 
Context: In my form control there is a field called Characters,  which is a text column in my sharepoint list, however I use a combox on top of the textinput control to fill the data. 
 
I set the default property of my characters datacardvalue( text input control) to 
Concat('Char_CB_2'.SelectedItems, 'Characteristics' & Char(10))
 
If I have selected three options in my combo box all these three will be stored in the sharepoint and separated by a new line character (char(10))
 
Example: If I select Red, Green in my combobox then it will saved as RED/n Green 
 
So, later If I open this record in the Edit Mode Form,  then I would like to display these values in my combo box separately. 
 
Now it displays the value together. Example: Red Green   
 
 
  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 145,475 on at
    Default Selected Items for Combobox
    I have a blog on this process that may assist. A couple of changes that may help - if you are not already doing this, your Data Card Update would be
    Concat(
       'Char_CB_2'.SelectedItems, 
       Characteristics,
       Char(10)
    )
    using the & separator puts an extra line return at the end.
    Your DefaultSelectedItems would be
    RenameColumns(
       Split(
          ThisItem.Characters,
          ","
       ),
       Value,
       Characteristics
    )
    I am assuming here that your List Text field name is Characters and the Combo Box displayed field is Characteristics
     
    Please click 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 giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn    Buy me a coffee
  • SaiRT14 Profile Picture
    SaiRT14 1,926 on at
    Default Selected Items for Combobox
     

    Modify the DefaultSelectedItems Property of the ComboBox Use the Split function to convert the text stored in SharePoint into a table. Example formula for the DefaultSelectedItems property 

    ForAll(
        Split(ThisItem.Characters, Char(10)),
        {Characteristics: Result}
    )
     

    combo box's Items property is set to the same data source you are using to populate it initially. Choices(YourDataSource.Characters)
     

    pls try. thanks

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,475

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,767

Leaderboard