Recently, one of the Power Automate Community member bring my focus to SharePoint Multiple choice values. He wants to incorporate multiple choice values in an email from SharePoint list multiple choice column. Problem is that the output from multiple choice values is not straight forward. You need to collect value then format your output in neat and clean way.
Here is my SharePoint List with multiple choice values-
When we design our flow to collect selected choices we get output like this-
Here you can see that selected choices are in one single string – ParisBerlinGoa which can give confusion to end user.
To overcome such problem we can put one comma (,) and space after appending variable then we get output like this-
Problem in this output is that it still leaves comma at the end. And this is not a cleaner way to show information over email to end user. Then we have to design our flow in such a way that it should remove last comma(,) from the output.
- First you need to initialise one more variable called- Count (Type-integer, Value=0)-
- Second you need to count number of choices selected by end user using length() function-
- Now in Apply to each action we need to Increment count by one then by using condition action we can append selected choices in VarString Variable. Here When count value is greater than Total selected choices then it will execute NO block where it will append last choice without comma & space.
Now you can use compose output in your Send email action where it will have neat and clean selected multiple choice values in end user email.
In case you need to show them in bullet/number format in your email. Please use dot/Count variable and <br> tag for good display.
- Choices in bullet format
- Choices in number format
if you only want to display choices separated by comma then use skip() function.