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 / Populate a Combobox Ba...
Power Apps
Answered

Populate a Combobox Based on a SharePoint List Text Column

(1) ShareShare
ReportReport
Posted on by 365
Hello,
 
I am working on improving an existing Power App that someone else made and I'm running into an issue with something I am trying to do.
 
Within the existing Power App is a Combobox of options. When an option is selected, it populates a Text datacardvalue with the selection and adds a comma at the end. Here is the Default field of the text DataCardValue:
 
Concat(vComboLLC.SelectedItems, Value & ", ")
 
The Items property of the Combobox is all manually typed values, like ["Value1", "Value2", "Value3"]
 
Supposedly the original creator had a very specific reason for setting the Power App up this way and I am not to change the field to a Choice column in SharePoint.
It will apparently break a lot of other things.
 
 
 
What I am working on is having this field (and all others within the Power App) to have a Default field where they pull in data submitted to SharePoint,
and any OnChanges patch the SharePoint list.
 
I have the patch working by giving the Combobox the OnChange value of:
 
Patch(List1,
    LookUp(Filter(List1,'Email1'=User().Email),'Email1'=User().Email),
    {
        'TextColumn1':DataCardValue25.Text
    }
    )
 
 
My question is: How do I get the Combobox to have a Default value that pulls in and selects the fields that are in the Text column within SharePoint?
I'm assuming I'll have to cut off that comma that gets added, but I'm not sure how to make the choices be selected in the Combobox. Is it even possible?
Categories:
I have the same question (0)
  • Suggested answer
    SaiRT14 Profile Picture
    1,992 Super User 2025 Season 1 on at
    1. Setting the Default Value of the ComboBox Based on SharePoint Data
    set the DefaultSelectedItems property of the ComboBox (vComboLLC in your case) to match the data stored in the SharePoint list.
    Split(LookUp(List1, 'Email1' = User().Email).TextColumn1, ", ")
     
    2. Updating the ComboBox Selections to SharePoint:
    modify the OnChange property to update the SharePoint field:
    Patch(List1,
        LookUp(Filter(List1, 'Email1' = User().Email), 'Email1' = User().Email),
        {
            'TextColumn1': Concat(vComboLLC.SelectedItems, Value & ", ")
        }
    )
     
    3. Removing the Trailing Comma (Optional):
     
    Patch(List1,
        LookUp(Filter(List1, 'Email1' = User().Email), 'Email1' = User().Email),
        {
            'TextColumn1': Left(Concat(vComboLLC.SelectedItems, Value & ", "), Len(Concat(vComboLLC.SelectedItems, Value & ", ")) - 2)
        }
    )
     
    Try and let me know.
     
  • Thor_PPC Profile Picture
    365 on at
    Hello @SaiRT14,
     
    Unfortunately Setting the Default Value of the ComboBox Based on SharePoint Data that you shared doesn't seem to work. As soon as the code is input, it clears out anything that is currently selected by the user.
  • Verified answer
    WarrenBelz Profile Picture
    156,386 Most Valuable Professional on at
    I will provide a human-generated response - there are a couple of things that may affect the result. Firstly you can get rid of the trailing comma on the Default of the Text Input with (note comma instead of &)
    Concat(
       vComboLLC.SelectedItems, 
       Value,
       ", "
    )
    Also you do not need both Lookup and Filter on the Patch
    Patch(
       List1,
       LookUp(
          List1,
          'Email1' = User().Email
       ),
       {'TextColumn1': DataCardValue25.Text}
    )
    Now to the DefaultSelectedItems (not the Default) of the Combo Box
    Split(
        LookUp(
          List1,
          'Email1' = User().Email
       ).TextColumn1,
       ", "
    )
    All of this works perfectly on a model I created below
     
    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    Buy me a coffee

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

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard