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 / Concat contents of a L...
Power Apps
Answered

Concat contents of a List Box to a String

(0) ShareShare
ReportReport
Posted on by 40

Hi

I'm trying to concat the contents of a list box (listbox1) to a string. I hope to use the string as a parameter in a Run() which will be a trigger for Power Automate to send an email.

 

I'm using this code Concat(listbox1.SelectedItemsText.Value, Concatenate(Text(Value),";")) within OnSelect (should it be On Select? or Text)

 

Although there does not appear to be any errors this does not return the resulting concatenated string. 

 

Can anyone help with this please?

Categories:
  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Typically you would use it in a text property.   Maybe have a hidden label that you use it in and then use the value of the label in your Flow.

  • LyndaSlessor Profile Picture
    40 on at

    @JR-BejeweledOne Thank you very much for the quick reply.

     

    I have tried that and the outcome is a message to say We didn't find any data when I click on .Value - there are two email addresses in listbox1 that display correctly on screen but they won't concat into my hidden label

     

    I feel I must be missing something silly....

     

     

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    I have a data source that has an email column in it.  I put my items in a listbox and this is the formula I used successfully to concat the items.

     

    Concat(ListBox1.SelectedItems.Email, Concatenate(Email, ";"))
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @LyndaSlessor ,

    Use:

     

    Concat(
     listbox1.SelectedItems,
     Value&";"
    )

     

    it should be enough ...

    Hope it helps !

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @LyndaSlessor,

    Check as below:

    Concat(ListBox1.SelectedItems,Value,";")
  • LyndaSlessor Profile Picture
    40 on at

    Thank you all very much for your suggestions

     @JR-BejeweledOne - @gabibalaban - @v-qiaqi-msft 

    Unfortunately none of these are giving me any results and I'm still getting the message 'We didn't find any data'.  I know my listbox has data as it's displayed in the listbox.

     

    I have a listbox and a label:

    ListBox1 has a Filter that compares the values in an SP List column and displays the email addresses from one of the other columns (this is not a Person/Group column, just a string of email addresses separated with a semicolon. I know I should use the Person/Group type but I'm new to Power Apps and don't know enough yet to work out how to use that  😓)

    Label1 which I'm using to concatenate the email addresses from ListBox1. The code Concat(ListBox1.SelectedItemsText, Value, ";") in the Text property of the label doesn't throw up any errors and seems happy enough, but when I click SelectedItemsText it comes up with the 'didn't find any data' message.

     

    Could the problem be with ListBox1 do you think?

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    What is your items property on your list box?

  • LyndaSlessor Profile Picture
    40 on at

    @JR-BejeweledOne Here it is...

    Distinct(Filter('SP List', Title in ListBoxFunctions.SelectedItems.Result), Label1)

     

    ListBoxFunctions is another listbox of values, the Filter matches the values in the SP List Title column and the selected values from the ListBox.

     

     

     

     

     

  • JR-BejeweledOne Profile Picture
    5,836 Moderator on at

    Try this:

    Concat(
     listbox1.SelectedItems,
     Result&";"
    )
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @LyndaSlessor ,

    there something strange with your formula, I mean I don’t see any reason why you used Label1 in it.

    It should be:

    Distinct(yourFilterResult, aColumnNamefromDataSource)

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard