How to extract value from SharePoint Multiple Choice Values column in flow?

SharePoint - Power Automate

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-

SharePoint List

When we design our flow to collect selected choices we get output like this-

SharePoint Flow

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-

SharePoint Flow

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.

Steps-

  • First you need to initialise one more variable called- Count (Type-integer, Value=0)-

SharePoint Flow

  • Second you need to count number of choices selected by end user using length() function-

length(triggerOutputs()?[‘body/PreferredLocation’])

SharePoint Flow

  • 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.

SharePoint Flow

  • Output-

SharePoint Flow

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.

SharePoint Flow

Email output-

  1. Choices in bullet formatEmail
  2. Choices in number formatEmail

UPDATE-

if you only want to display choices separated by comma then use skip() function.

skip(outputs(‘Compose-Output’),1)
Skip

See my other Power Automate posts

Thank You!!!

-Gopenly