Skip to main content

Notifications

Community site session details

Community site session details

Session Id : dmGbabmbzSeARpbVpMe8ql
Power Apps - Building Power Apps
Answered

Convert combo box selected items into a string

Like (6) ShareShare
ReportReport
Posted on 19 Jun 2018 21:48:39 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?

  • Ash26 Profile Picture
    on 29 Feb 2024 at 12:22:29
    Re: Convert combo box selected items into a string

    What if your combo box is not connected to any tables? and you are using local Item value?

  • allan_t Profile Picture
    300 on 14 Nov 2023 at 21:16:35
    Re: Convert combo box selected items into a string

    @Brian_ Thank you, you saved me after an hour of troubleshooting.  

  • _Ken Profile Picture
    120 on 13 Jul 2021 at 06:07:14
    Re: Convert combo box selected items into a string

    @WillPage  Try this:

    Concat(ComboBox1.SelectedItems, Text(Product), ", ")
  • cycle4passion Profile Picture
    94 on 16 Jan 2021 at 18:27:03
    Re: Convert combo box selected items into a string

    Sorry already solved above

    You just need to take he last 2 characters off the string:

    Left( Concat(ComboBox.SelectedItems, Product & ", " ), Len( Concat(ComboBox.SelectedItems, Product & ", " ) ) - 2 )

  • SSISJoost Profile Picture
    21 on 03 Jan 2021 at 21:25:18
    Re: Convert combo box selected items into a string

    Here is some example code for combobox items. List of ID's separated with a comma: 

    Concat(
     ComboBox_multiselect.SelectedItems.ProductKey,
     Concatenate(
     Text(ProductKey),
     ","
     )
    )

     and to get rit of the last (unwanted) comma:

    Left(
     Concat(
     ComboBox_multiselect.SelectedItems.ProductKey,
     Concatenate(
     Text(ProductKey),
     ","
     )
     ),
     Len(
     Concat(
     ComboBox_multiselect.SelectedItems.ProductKey,
     Concatenate(
     Text(ProductKey),
     ","
     )
     )
     ) - 1
    )

    This results in a list of the ID's of the selected combo items, for example in a label:

    PowerAppsCombo01

  • CindyZ Profile Picture
    on 03 Jan 2021 at 18:35:53
    Re: Convert combo box selected items into a string

    This is what I resolved this with. 
    Left(Concat(cmbxEventSponsoringChapter.SelectedItems,(Concatenate(Acronymn,", "))),Len(Concat(cmbxEventSponsoringChapter.SelectedItems,(Concatenate(Acronymn,", "))))-2)

  • CindyZ Profile Picture
    on 29 Dec 2020 at 19:20:50
    Re: Convert combo box selected items into a string

    @cweaver Could you please tell me how you would add Left and Len into this formula.  I have not been able to resolve it so I can remove the trailing comma.  Thank you.  

    Concat(cmbxEventSponsoringChapter.SelectedItems,(Concatenate(Acronymn,", ")))

  • CindyZ Profile Picture
    on 27 Dec 2020 at 13:54:52
    Re: Convert combo box selected items into a string

    Perfect, thank you!

  • cweaver Profile Picture
    98 on 25 Sep 2020 at 21:41:48
    Re: Convert combo box selected items into a string

    For those of you using an external source for your combo box items, I'd like to amend csegovia's formula to:

     

     

    Left(Concat(YourComboBox.SelectedItems,Result&", "),Len(Concat(YourComboBox.SelectedItems,Result&", "))-2)

     

     

     

  • WillPage Profile Picture
    1,907 on 23 Oct 2019 at 02:54:35
    Re: Convert combo box selected items into a string

    @csegoviaIt works pretty well. I wouldn't call it inelegant, when you consider the sort of monstrosities that can come out of the expression builder in Flow.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 83 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 54

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 42 Super User 2025 Season 1

Overall leaderboard