web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Convert combo box sele...
Power Apps
Unanswered

Convert combo box selected items into a string

(6) ShareShare
ReportReport
Posted on by 89

I'm trying to send the selected items in a combo box to a string for output. I know I can out individual selected items several different ways but I can't figure out how to convert all of them into one contiuous string.

I can show the first;

First(ComboBox1.SelectedItems).Title

Or the last;

Last(ComboBox1.SelectedItems).Title

And I can find the number of selected items;

CountA(ComboBox1.SelectedItems.Title)

But how do I get the first last and everything in between?

Categories:
I have the same question (1)
  • Verified answer
    Brian_ Profile Picture
    89 on at

    I found the answer

    Concat(ComboBox1.SelectedItems, Title & ", ")
  • MK1 Profile Picture
    169 on at

    hi 

    I tried to use Combobox.selected.value. But its giving me error on the text box and not populating what ever i select on combo box.

    When i use combobox.selected.Result i was only able to get one value populated into thetext box.

    Any ideas to fix this would help.

    Thanks,

    MK

  • MK1 Profile Picture
    169 on at

    hi

    I tried to use Combobox.selected.value. But its giving me error on the text box and not populating what ever i select on combo box.

    When i use combobox.selected.Result i was only able to get one value populated into thetext box.

    Any ideas to fix this would help.

    Thanks,

    MK

  • Brian_ Profile Picture
    89 on at

    It would appear from what you typed that you are not using the correct key property. For a multi-select combo box you would use Combobox.SelectedItems, not Combobox.selected.value.

    When you use Combobox.SelectedItems you are referring to a table of records not values, so you need to still reference which value(column) from each record you want as a result. In my example I was wanting to combine the Title column from the selected records, therefore my formula was like this.

    Concat(ComboBox1.SelectedItems, Title & ", ")

    Hope this helps.

    Brian

     

     

  • MK1 Profile Picture
    169 on at

    Hi @Brian_,

     

    I tried to use 

    Concat(ComboBox1.SelectedItems, Title & ", ")

    But,In my scenario I'm filtering combobox values based on Another dropdown

    Dropdown1:

    Filter('Data Sources',Product.Value="XXXX") 

    so, dropdown1 will have 3 products(A,B,C)

    When a user selects B  product, it will populate other combobox with its product values.

    On Combobox i'm using a lookup column which is releated between datasurce1 and datasource2. And I'm filtering the product values into combobox.

    Distinct(Filter(Datasource2,Details.Id=Datasoruce.Selected.ID),ProductValues)

    So, now when i select multiple product values form Combobox it should populate another texbox with these details.

     Concat(ComboBox.SelectedItems, ComboBox.Selected.Result & ", ")

    when i do this whatever i select first is populating multipletimes into the textbox.

    can you help me with this scenario.

  • Brian_ Profile Picture
    89 on at

    Sorry, it's been a long day and I need to look at this when I'm fresh but I did notice you are referring to one selected item in your formula, which is why you are getting the repeating result in the textbox.

     Concat(ComboBox.SelectedItems, ComboBox.Selected.Result & ", ")

    ComboBox.Selected.Result refers to one particular selected item, not a column from the table of results.

    In this 

    Concat(ComboBox1.SelectedItems, Title & ", ")

    "Title" refers to a column, not any particular selected item. You need to refer to a column in the reults of the selected items.

    For example if you ComboBox records which you are selecting from contain the columns "ID", "Product", and "ProductValues" your formula may look like any of these;

    Concat(ComboBox1.SelectedItems, ID & ", ")
    Concat(ComboBox1.SelectedItems, Product & ", ")
    Concat(ComboBox1.SelectedItems, ProductValues & ", ")

     

  • Brian_ Profile Picture
    89 on at

    So I had a thought this morning. If you aren't sure what fields you have to choose from to put in place of where I had "Title", do this.

    Add a Data Table to the screen where the combobox is temporarily and set the data source as the combobox.SelectedItems

    Once you've selected an item you can go to the DataTable and see a selection of fields that are available to populate the table.

    Hope this helps.

    Brian

  • peter_not Profile Picture
    50 on at

    Well done, @Brian_

  • WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at

    @Brian_thanks for this (I found it in a search for exactly the same question). Do you know how to strip off the trailing comma?

  • sludgeza Profile Picture
    27 on at

    Please explane how this is used?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard