Ok I have the flow made with picture instructions. The primary key to make the flow work starts with you to manually input the column names (Title and InternalName) as well as the corresponding multi-choice response into an Array variable. This variable will be used to reference what was selected in the multi-choice response to the corresponding column.
The benefit of this manual array is that you can easily match choice values to the columns and don't need to choice options to exactly match the column name.
The difficult part of this manual array is making sure the text match exactly as well as the format of the array itself. If you are off by a space or incorrect letter, then it will not work correctly.
FYI: I made the flow and manual array in this format so that it is possible to adjust the flow and add some steps so that the column names and choice values can be pulled using an HTTP request without needing to type the full manual array. However, I think the example is better with the manual array since it is easier to adjust for text errors.
Below is my example SharePoint List and Columns:
SharePoint List View
SharePoint Multi-Choice Column
SharePoint List Settings
Below I am showing the individual Boolean (Yes No) type column names. This is to give an idea of how the column Title (what is displayed) can be different than the column InternalName that is used by power automate.
Column - Amazon
Column - Crate & Barrel
Column - Nissan
Column - Amazon - Secure
Column - DSG
Column - Marvel Studios
SharePoint columns have a Title and InternalName. The Title is what is displayed and can be changed. The column InternalName will never change after creation, even if the Title is changed, and the InternalName will encode special characters.
Below I am making a table to show how my SharePoint List Boolean (Yes No) columns correspond with the Multi-Choice options.
| Column Title | Column InternalName | Corresponding Multi-Choice Option |
| Amazon | Amazon | Amazon |
| Crate & Barrel | CrateBarrel | Crate & Barrel |
| Nissan | Nissan | NISSAN |
| Amazon - Secure | Amazon_x0020__x002d__x0020_Secur | Amazon Secure |
| **bleep**'s Sporting Goods | Dick_x0027_s_x0020_Sporting_x002 | DSG |
| Marvel Studios | Marvel_x0020_Studios | Marvel |
This same type of relationship will be typed into the Manual Array in the flow.
Below is an outline of the flow actions:
Example Flow Overview
I have renamed actions using custom titles, but the type of action such as "Parse JSON", "Select", "Set Variable", "Update Item", etc, is within the first part of the name so you should be able to tell what type of action to add to your flow. For example, the action "A2 Parse JSON - ManualColumnReferenceArray" is a Parse JSON action that I renamed. Similarly, the action "B1 Select - MultiChoice Response Format" is a Select action that I renamed.
I will begin to show detailed parts of the flow with descriptions.
Flow Detail 1
The beginning of the flow is basically a trigger for when an item is created and then to Initialize Variable of an Array. This Array will be manually filled in a following step with the column names and corresponding choices. So leave it blank when it is initialized.
The manual array needs to be filled in the step "A1 Set Variable - Manual Column Reference" in the correct format. You need to insure the text matches column names and choices as well as no additional spaces added.
Flow Detail 2 - Manual Array Reference
Below is the text format of what to use in the "A1 Set Variable - Manual Column Reference" so you can copy and paste into your flow and edit the column names. If you need more columns, just add to the example but remember to not have a comma after the last item.
[
{
"InternalName": "Amazon",
"Title": "Amazon",
"ChoiceOption": "Amazon"
},
{
"InternalName": "CrateBarrel",
"Title": "Crate & Barrel",
"ChoiceOption": "Crate & Barrel"
},
{
"InternalName": "Nissan",
"Title": "Nissan",
"ChoiceOption": "NISSAN"
},
{
"InternalName": "Amazon_x0020__x002d__x0020_Secur",
"Title": "Amazon - Secure",
"ChoiceOption": "Amazon Secure"
},
{
"InternalName": "Dick_x0027_s_x0020_Sporting_x002",
"Title": "**bleep**'s Sporting Goods",
"ChoiceOption": "DSG"
},
{
"InternalName": "Marvel_x0020_Studios",
"Title": "Marvel Studios",
"ChoiceOption": "Marvel"
}
]
The action "A2 Parse JSON - ManualColumnReferenceArray" is a Parse JSON on the array variable. The schema should not change since the values being used are the same no matter how many columns you add to the array.
Use the text below to copy and paste directly into the Parse JSON schema.
{
"type": "array",
"items": {
"type": "object",
"properties": {
"InternalName": {
"type": "string"
},
"Title": {
"type": "string"
},
"ChoiceOption": {
"type": "string"
}
}
}
}
The next flow steps are to initialize two more variables that will be used later and map the outputs of the SharePoint List Item choice columns using a Select action.
Flow Detail 4 - Select Choice Values
Within the Select action the From: is the full choice column body and the Map is the choice column Value. There will be multiple dynamic content options for a choice column, so be sure to put the Body in the From and the Value in the Map.
The next flow step is an Apply to Each which is using the array variable that has the column names. The apply to each is going through each column name and corresponding choiceOption and comparing it to what is mapped in the Select action.
So for each column name, it is asking, "Does the Select output contain the ChoiceOption for this column? If yes, then put a value of true, if no, put a value of false."
Flow Detail 4 - Apply to Each Column
The format and expression used in "C1 Append to Array Variable - BooleanColumnResultsArray" is so that it can add each value to an array. The format is below:
{
{InternalName}: {true/false}
}
The if() expression used to determine if the value should be true or false is below:
if(contains(body('B1_Select'),items('C0_Apply_to_Each')?['ChoiceOption']),true,false)
The exact example used with my action names is below:
{
items('C0_Apply_to_Each')?['InternalName']: if(contains(body('B1_Select_-_MultiChoice_Response_Format'),items('C0_Apply_to_Each')?['ChoiceOption']),true,false)
}
The action "D1 Set Variable - ResultsObject" is taking the variable array "BooleanColumnResultsArray" and formatting it into a single object. It is doing this by converting it to a string, replacing the array brackets, and then setting it to a json object.
This is so that the Update Item can be used without an Apply to Each which would be required if using an Array variable. Since it will be a single object, you can call individual items out of the ResultsObject in the Update Item step.
The expression used in "D1 Set Variable - ResultsObject" is below:
json(replace(replace(replace(string(variables('BooleanColumnResultsArray')), '[{', '{'), '}]', '}'), '},{', ','))
The Update Item is relatively simple for calling values out of the variable ResultsObject.
Flow Detail 5 - Update Item
The only difficult part of the Update Item action is needing to manually type in the expression that will reference the value from the ResultsObject variable.
Below are the specific steps for putting the expression to get the value out of the variable. It is basically variable('ResultsObject')?['InternalName'] for each column.
The InternalName is what was used in the ManualColumnReferenceArray;
Update Expression 1
Update Expression 2
Update Expression 3
Update Expression 4
I made an item in my SharePoint list that had all choice options selected and here are the results:
Flow Results 1
Flow Results 2
Flow Results 3
SharePoint List Results
This might seem like a lot, but the flow is actually short. You just have to make sure the items are referenced correctly. I wanted to add a lot of pictures to help reference.
Let me know if this works for you,