web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Split Multi Choice que...
Power Automate
Answered

Split Multi Choice question into 8 Yes/ No SharePoint columns

(0) ShareShare
ReportReport
Posted on by 118

Hi Folks

 

I have a MS Forms multi-choice question where any combination of 8 answers can be selected and is a required question.

 

The 8 answers align to 8 SharePoint columns that are of Yes/No type.

 

My flow has JSON compose and Select to split out the answers, but I'm stuck on the best way to then update the required SharePoint columns.

 

I assume I need to convert at some point the output of the Select operation into boolean(?) and 'split out' and apply each answer so any that come back as true updates the right SharePoint column when I use Create Item. 

 

Not sure if I need Switch, Split or use Coalesce or something else!

 

Thanks

Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    @SteveMForm 

    Are you able to upload a screenshot please. Thanks

     

  • SteveMForm Profile Picture
    118 on at

    Hi @SudeepGhatakNZ 

     

    these are going to be heavily redacted (sorry) but will give you an idea of what I have:

     

    the questions:

    SteveMForm_0-1709595751099.png

     

    The Compose and Select for separating the values:

    SteveMForm_1-1709596015688.png

    Create Item showing the 8 columns in the list and the current values set by Power Automate on creation of the control (which will need to be replaced with an expression?):

     

    SteveMForm_2-1709596102414.png

     

    The 8 sharepoint columns with Yes/No type - you can see ticks where it is a yes:

     

    SteveMForm_3-1709596214679.png

     

  • SudeepGhatakNZ Profile Picture
    14,396 Most Valuable Professional on at

    A conditional expression should do the job.

    What is the value of the compose action above the Create item?

    Will this work?

    if(equals(outputs('ComposeXXX'),'Yes'), true, false)

     

  • SteveMForm Profile Picture
    118 on at

    Hi @SudeepGhatakNZ 

     

    where would that expression sit, and does it handle all 8 questions? (I was thinking I would need 8 of these to enter each one against the column names in the Create Item.

     

    To outline the scenario, if it helps:

     

    I have a form with a number of questions, one which is a multi-choice answer which is required (so will have any combination of 1 to 8 answers)

     

    I need to take the choices selected from this question which are string based, convert them to the right format to update a 'Yes/No' column type in SharePoint (true/ false I assume) and update each column in SharePoint when creating the Item that has a true passed through for it.

    The flow broadly is as follows:

     

    1. Manually trigger a flow (for easier testing)

    2. Get Response details (from form)

    3. Initialise several variables used in the switches later. I initialise one for the 'Service' selected for the multi choice question as follows:

     

    SteveMForm_0-1709656480698.png

     

    4. We then go into formatting the form outputs, and for the 'Service' question, I have a JSON Compose and then a Select to separate the values to items

     

    5. I then tried (and failed) to use a split to separate out all the items in the 'Compose Service Split' with the following expression: 

    split(body('Select_BA_Service'),',')
     
    I'm not sure if it's right, but it expects a string and but the output from 'Select BA Service' is an array.

    SteveMForm_1-1709656798609.png

     

    6. Further on in the flow, I try and use a switch to change each output value from the 'Compose Service Split' to a Yes/ No answer:

     

    SteveMForm_2-1709657330517.png

    SteveMForm_3-1709657468960.png

    and so on (I have 8 cases, plus a default)

     

    7. I'm then trying to compose as you stated the If statement:

     

    SteveMForm_4-1709657808556.png

     

    If(equals(variables('varService'),'Yes'), true, false)

    8. I then try and use the output from this in the Create Item against each column:

     

    SteveMForm_5-1709658029045.png

    It basically fails right up at the Compose Service Split:

     

    Unable to process template language expressions in action 'Compose_Service_Split' inputs at line '0' and column '0': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Array'. 

     

    If I remove the Split, the Switch for changing the question responses to Yes/Nos in pint 6 above  fails:

     

    The execution of template action 'Switch' failed: The result of the evaluation of 'scope' action expression '@body('Select_BA_Service')' is not valid. It is of type 'Array' but is expected to be a value of type 'String, Integer

     

    It's become a bit of a muddle!

     

    If we can step through the scenario, I think we can sort it 🙂

     

    Thanks

     

  • Verified answer
    SteveMForm Profile Picture
    118 on at

    Hi All

     

    see here for simpler solution to this:

     

    Solved: Re: How can I use values from an array to update c... - Power Platform Community (microsoft.com)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 589

#3
Haque Profile Picture

Haque 522

Last 30 days Overall leaderboard