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 / Listbox in Power Apps ...
Power Apps
Answered

Listbox in Power Apps Form Writing Multiple Values to SharePoint List

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi there,

 

I have a listbox in a Power Apps Form that I would like to use to allow users to select multiple items and have them write to a single field in a SharePoint list, perhaps separated by commas or semicolons. 

 

I've been able to create the listbox and have it populate from another SharePoint list, and I've amended the Update field of the datacard as follows (where Title is the name of the field that populates the listbox): 

DataCardValue2.SelectedItemsText.Title

 

When I submit the form with multiple items selected in the listbox, there are no runtime errors, but the multiple items do not write to the corresponding SharePoint list. The target column is set as Single Line of Text.

The question is, do I have the wrong syntax in the Update field, or is the SharePoint list column type set up incorrectly to receive the data? 

 

Many thanks in advance for any assistance that may be provided.

 

Best,

James.

 

Annotation 2020-02-27 151728.png

Categories:
I have the same question (0)
  • dinusc Profile Picture
    Microsoft Employee on at

    Hello @Anonymous ,

    Please try to use the "Concat" function in order to convert your list of multiple items into a comma separated string:

    Concat(DataCardValue2.SelectedItemsText, Title& ", " )

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi there @dinusc ,

     

    Many thanks for your assistance. Could I just confirm where I need to enter the concat function? When I try to enter it into the Update field of DataCard2 it won't run as it expects a Table as the first parameter, not DataCardValue2.

     

    Best,
    James.

     

    Annotation 2020-02-27 151728.png

  • Verified answer
    dinusc Profile Picture
    Microsoft Employee on at

    In a form, every field is represented by a card. If I understood your case correctly then you would like to take multiple selected values from a ListBox and save them as a single value in a list field of type "Single lie of Text". If so and then in a form that is bound to the list you want to save to, you should be able to add a card for that Single lie of Text field. You will most likely end up with a TextInput control there, like in the attached picture.

     

    Note the card's Update property. Now you can unlock the card from Advanced Panel, remove the TextInput control (DataCardValue10)  and replace it with ListBox control (ListBox1 for example). After this you can set the following formula into the card's Update property field:

    Concat(ListBox1.SelectedItems, Title&",")
    This will essentially join all the values (Titles) into a single comma separated field. Note that an extra coma will be present at the end (you can remove it with another function if you want) and that the formula assumes that you're interested in saving the "Title" field of the selected item. Hope this helps.
    Capture.PNG
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi there @dinusc,

     

    Yes, that worked perfectly - thank you very much.

     

    Best,

     

    James.

  • kp54357 Profile Picture
    2 on at

    Thanks, But what does Title refer to in this formula.

    I tried Concat(ListBox1.SelectedItems, ",") and it just stores , instead of any values.

  • Dunc Profile Picture
    14 on at

    Title probably refers to the actual field name in the sharepoint list. 

     

    SharePoint lists by default have a Title field. You can rename it in SharePoint, but in the background, it still calls it 'Title'. The way to see exactly what SharePoint calls a field is when viewing a List, click on the cog, top right corner, and go to List Settings.

     

    You will see a list of all column names. If you renamed the default Title field to, say, 'Bananas', then click on 'Bananas' field in the list. You will move to a field edit screen, but look at the address bar/URL....the very last part of that will show the actual name SharePoint uses.

     

    If this doesn't make sense, let me know.

  • HwkIFan Profile Picture
    on at

    In my case, I use a collection of names to populate a listbox.  The method stated saves the multiple selections in my associated list as expected. The issue I have is I need each Listbox to highlight the names stored in its associated list field for the selected record, if the field contains data...Not having luck with this.

     

    Any ideas?

  • JacksonTeo Profile Picture
    35 on at

    Hello, it works when adding a new record. How about if I'm using the same form with the same list box to edit a record? The selected Items are not highlighted in the list box. Please help.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 426

#2
WarrenBelz Profile Picture

WarrenBelz 381 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 315 Super User 2026 Season 1

Last 30 days Overall leaderboard