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?
Solved! Go to Solution.
If this works you might change it like this to remove that last ";"
Left(Concat(Distinct(Filter('IDL Email List', Title in ListBoxOfFunctions.SelectedItems.Result), EmailString), Result & ";"), Len(Concat(Distinct(Filter('IDL Email List', Title in ListBoxOfFunctions.SelectedItems.Result), EmailString), Result & ";")) -1)
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.
@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....
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, ";"))
Thank you all very much for your suggestions
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?
What is your items property on your list box?
@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.
Concat( listbox1.SelectedItems, Result&";" )