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?
What if your combo box is not connected to any tables? and you are using local Item value?
@Brian_ Thank you, you saved me after an hour of troubleshooting.
@WillPage Try this:
Concat(ComboBox1.SelectedItems, Text(Product), ", ")
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 )
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:
This is what I resolved this with.
Left(Concat(cmbxEventSponsoringChapter.SelectedItems,(Concatenate(Acronymn,", "))),Len(Concat(cmbxEventSponsoringChapter.SelectedItems,(Concatenate(Acronymn,", "))))-2)
@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,", ")))
Perfect, thank you!
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)
@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.
WarrenBelz
83
Most Valuable Professional
MS.Ragavendar
54
Michael E. Gernaey
42
Super User 2025 Season 1