Microsoft Flow – Update a multi select choice field in a SharePoint list

Some simple tasks in Microsoft Flow can look really hard. Although once you’ve found the solution you might find that it is simple to implement your solutions. Yesterday I was contacted about how to update multiple choice fields in SharePoint. In the past I even used HTTP requests to sort this out, but actually the better solution is to use the Create item or update item action that is available as part of the SharePoint connector.

Multi select choice field in SharePoint

I started by creating a multi select choice field in my SharePoint list:

My choice field has the options of A .. G  available as check boxes on my test list.

Convert Text into Array

Within my Flow I’m creating a compose action that holds the data. You might find that this data actually comes form somewhere, and it might have a slightly different format. For simplicity sake I’ve chosen to make the options available in text format separated by ;# so that have the items available that I want to select on my SharePoint list item.

The first step is to create an Array outr of this text. The split function  sorts this out for me.

We now have an array of the options as shown below:

I know that my Create item action will require the following format:

[
{
"Value": "A"
},
{
"Value": "B"
},
{
"Value": "D"
},
{
"Value": "G"
}
]

 

Transform arrays

We now just need to transform the array that we have with the array that we want

Create the item in SharePoint

Now creating an item with  the choice field set is a piece of cake.

The Create item action should just be configured as shown below where the multi choice field is set to the output from my select action.

 

 

Advertisements


Categories:Flow, Microsoft Flow, Office 365, SharePoint Online

Tags:

2 replies

  1. Hi Pieter,
    Can you help on scenario you are using flow to read list items whereby one of the column is multi choice with multi value? For example you want to create html table and send email with selected list items which include value from the Multi-choice column.
    Using above example, i struggle when it comes to assigning one list item the correct value for each column

    Like

    • Hi Christobal,

      When you read the values form the list item you will end up with potentially multiple values for the multi value column. This will mean that you will need to take the multi column and read the values from the collection and format the html for this manually. you could probably create an html list from the collection of values selected and then include that in your HTML table cell.

      Like

Leave a Reply to Pieter Veenstra Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: