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 / Mutli selection in SP ...
Power Apps
Answered

Mutli selection in SP list not showing in PowerApps ComboBox when editing

(0) ShareShare
ReportReport
Posted on by 4

Hello, 

I am struggling with ComboBox since yesterday, found most of my solutions but can't seem to solve this last one. Hope someone will be able to help 🙂

 

I have a SharePoint list with several fields including a Single line of text field called "Competitor Brand". I am using PowerApps to customize this form and make it more efficient.

1. I created a second list in the background listing all competitor brands which I want to offer as choices in my form. This list is called "CompetitorBrands".

2. In PowerApps, I removed the Text input box from the form and replaced by a ComboBox (as I want multiple choices to be unabled).

3. The ComboBox Item Property is: SortByColumns(CompetitorBrands.Title, "Title")

4. The DataCard Update Property is: Left(Concat(ComboBox1.SelectedItems, Title & ", "), Len(Concat(ComboBox1.SelectedItems, Title & ", "))-2)

 

With this configuration I am able to save a new list item and it displays as expected, meaning that if 3 competitors are selected it will report in the SharePoint list as 1, 2, 3

 

My issue comes up when I want to edit this item, the ComboBox shows up empty instead of having choices 1, 2 and 3 selected.

Any idea of how to solve this?

 

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

    @TataLili 

    If you are working with a Combobox, then you need to set the DefaultSelectedItems (DSI) property to be a table of records that have the EXACT schema of the Items property.  You have not mentioned what your DSI is currently, but without it, you will have nothing selected when you edit a record.

     

    If your Datacard Update property is:

    With({_d: Concat(ComboBox1.SelectedItems, Title & ", ")}, 
     Left(_d, Len(_d)-2)
    )

     

    And your Items property is: 

    SortByColumns(CompetitorBrands.Title, "Title")

     

    AND - Assuming that Title is the ONLY column of interest in your combobox, then you should CHANGE the Items property to:

    SortByColumns(CompetitorBrands.Title, "Title").Title

    And then Set the DSI property to:

    RenameColumns(
     Filter(
     Split(Parent.Default, ", "),
     !IsBlank(Result)
     ),
     "Result", "Title"
    )

     

    I hope this is helpful for you.

  • TataLili Profile Picture
    4 on at

    That is exactly what I needed, now it works !! 

    I had understood that I had to input something in the DefaultSelectedItems and that in included it  RenameColumns and Split functions but was not able to figure out how to set it up.

     

    For my understanding, could you explain what Parent.Default refers to and what the purpose of the filter function is with this !IsBlank(Result) ?

     

    Other than this I am accepting your answer as a solution. Thank you! Thank you! Thank you!

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

    @TataLili 

     

    DataCards in a form have a Default and an Update property.  These are *highly* important to your form and are used to influence many of the features of a form.

    The Default property is sort of the "input" to the datacard.  It is usually set to ThisItem.yourFIeld  So, essentially it is providing the value of the column for the record in the Item property of the form to the datacard.  This should very rarely be changed.  

    The Update property of the datacard is the "output" of the datacard that is supplied to the underlying Updates record...which is what is ultimately written to the datasource during a SubmitForm.

    The Unsaved property of the form relies on default and the update properties of all of the datacards in the form.  If it senses any difference between the Default and the Update properties of datacards, then the form is considered Unsaved.

     

    Controls all belong to parents.  If you add a label to the screen, then the screen is the parent of the label.

    If you add a form, the screen is the parent of the form.  If you have a datacard in the form, then the form is the parent of the datacard.  If you have a control in a datacard, then the datacard is the parent of the control.

    SO...since the datacard has a Default and an Update property, then any control in the datacard can access those properties by referencing Parent.<property>  In this case, Parent.Default.

     

    So in context now...your Default property of your datacard will have the joined string value of your competitor brand and the Default property will be shown as ThisItem.'Competitor Brand'

    The Combobox is in the datacard, so we can reference the Default with Parent.Default - we could have also referenced it with yourDataCardName.Default but, using Parent is much easier.

     

    As a bonus...the keyword Self is also useful.  It refers to the control itself.  So, for example, the OnSuccess action of the form is where you do actions when a submit is successful.  Many times you want to reference the record that was last submitted.  Thus, the LastSubmit property is a property that represents the last record written successfully.  So, to reference that, you could do yourForm.LastSubmit  OR, since you are in the context of the form, Self.LastSubmit is more generic and doesn't stop your train of thought to recall what your form name is.  

    This goes for any control and any property...you can access it within the context of the control with self.

    Like if you have a label and set it to look up a status in a record. Then you have a status, let's say "Open".  And now you want the color to be Green if the status is "Open", and Red if it is "Closed".  So, in the Color property of the Label, you can have this formula : Switch(Self.Text, "Open", Green, "Closed", Red, Black)  This is much quicker that repeating the formula or even having to remember the name of the label.

     

    NOW...the !IsBlank bit.

    When you spilt a text string many times that string might have a trailing separator.  Don't worry about trying to avoid putting it in because you can just filter it out...

    If you have a trailing separator, then you will end up with a last record that is empty because there is nothing beyond the trailing separator.  In your scenario with a combobox, this WILL cause the DSI to not work properly (i.e. having a blank record in the DSI table).

    So, the purpose of the Filter on the !IsBlank(Result) is just to remove that (or other) empty records from the Split.

     

    Hopefully that is all clear and helpful.

     

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

#2
11manish Profile Picture

11manish 141 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard