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 / Retrieving Combo box D...
Power Apps
Answered

Retrieving Combo box DefaultSelectedItems from a SharePoint multiline text field

(0) ShareShare
ReportReport
Posted on by

I have a SharePoint list named Projects, which in turn has a Listing (ID) and a Benefits column, the latter of which stores multiple lines of text. The DATA collection contains all data pertaining to the selected gallery item on a previous screen. In PowerApps itself, I have a label (lbl_Combo) and a Combo box (combo_Benefits). A button (btn_Save) stores the SelectedItems in the Benefits field:

 

 

 

Patch(
 Projects,
 First(
 Filter(
 Projects,
 Listing = DATA.Listing
 )
 ),
 {
 Benefits: Concat(combo_Benefits.SelectedItems, Value&Char(13))
 }
)

 

 

 

 

The Items that combo_Benefits has are:

 

 

 

[
 "A",
 "B",
 "C"
]

 

 

 

 

The SharePoint list stores the selected items just as I want it to. What's more, lbl_Display, whose Text field is set to

 

 

 

DATA.Benefits

 

 

 

also has no issues.

 

The issue arises when I want to retrieve the multiline text, split it back into separate entries, and connect those to DefaultSelectedItems. I attempted the following, to no avail:

 

 

 

Split(DATA.Benefits, Char(13))

 

 

 

Appending .Result to the above also provided no help.

 

How can I have the DefaultSelectedItems display the selected items I have stored in the Benefits column?

For example, Items "A" and "C" are selected and saved to SharePoint. Once combo_Benefits is Reset(), it should have "A" and "C" already selected.

Thanks in advance!

Categories:
I have the same question (0)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Here's an approach that works for me:

     

    I would set the Items property of combo_Benefits (a combobox) to 

    TableColl

    TableColl is a collection that is defined as below: 

    ClearCollect(TableColl, "A", "B", "C")

    The text property of a label lbl_Display is set to:

    Concat(combo_Benefits.SelectedItems,Value & Char(13))

    I then have another combobox for which I am setting the DefaultSelectedItems as: 

    Filter(TableColl, Text(Value) in Split(lbl_Display.Text, Char(13)))

    And this works fine. 

    The reason Split(DATA.Benefits, Char(13)) this doesn't work is because the last item in this table is a blank value AND the records in this table are not records of your original table (they have the same text but they are not the same records). 

     

    Let me know if this works for you. 

     

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    https://thepoweraddict.com

     

     

    TestCombo.PNG
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @JanikDriehaus ,

    Could you please share a bit more about the DATA collection that you mentioned? Do you use it to store selected item from your Previous Gallery?

    Further, do you want to display the saved options within combo_Benefits ComboBox?

     

    Based on the formula that you mentioned, I think  there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:

    Set the Items property of the combo_Benefits ComboBox to following:

    [
     "A",
     "B",
     "C"
    ]

    Set the DefaultSelectedItems property of the combo_Benefits ComboBox to following:

    ForAll(
     Split(DATA.Benefits, Char(13)),
     {
     Value: Result
     }
    )

     

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 542 Most Valuable Professional

#2
Haque Profile Picture

Haque 206

#3
Kalathiya Profile Picture

Kalathiya 201 Super User 2026 Season 1

Last 30 days Overall leaderboard