Skip to main content
Community site session details

Community site session details

Session Id : hlGHlJ+idfxazb/z4ymEtz
Power Automate - Building Flows
Answered

FORMS info mitigation to lists with multiple choice answers

Like (0) ShareShare
ReportReport
Posted on 22 Aug 2022 09:21:56 by 25

Hello,

I managed to get information from FORMS to LISTS via Power Automate (from now on PA). 

 

In our FORM, we have multiple selections activated to gather the information which of the following xyz departments are affected. I want to have a list that is presenting the following, just the way it would be presented if you generate a list entry manually in LISTS.

 

The bubble selection, the result of a manual added entry to the lists, is clearly highlighting the department and seperating the entries, whereas the automated transaction is gathering it as this ["HR","TQM","BPM"].

 

How do you get the multi selection field answers presented as if you would enter the data manually?

 

The overall goal is to get the seperate answers (in this case for example HR or TQM) analyzed later on by Power BI for our management to see how many Change Requests there were in a given year, what type of we had so far, how long they were processed, who had the mosts, etc. you name it. But I suppose that this will only be possible if they are seperate and not conglomerated to ["HR","TQM","BPM"].

Long story short, I need help...

 

Anmerkung 2022-08-22 111500.jpg

  • Verified answer
    skalinna3 Profile Picture
    25 on 30 Aug 2022 at 12:10:10
    Re: FORMS info mitigation to lists with multiple choice answers

    Thank you Marco, for all your help, with your troubleshooting effort, we managed to get it done!

    And for all of you, who followed the discussions and want to know what caused the problem and how to fix it:

     

    1. the JSON part should be linked to "apply to each 2", not "apply to each", which was not directly obvious

    2. Check your connections, if they are not corrupted and need a "repair"

    skalinna3_0-1661861283334.png

    3. if there are multiple questions with multiple choice answers, it is getting immediately rediciously complex, just as a note!

    Again, Thanks Marco! Problem solved!

     

  • skalinna3 Profile Picture
    25 on 29 Aug 2022 at 13:23:27
    Re: FORMS info mitigation to lists with multiple choice answers

    Hey,

    I got one step closer but still face a problem.

     

    the overall structure is now:

    skalinna3_0-1661779161331.png

    skalinna3_1-1661779174766.png

    skalinna3_2-1661779183565.png

    There was one failure, I did not notice directly, your scope-try part is containing all the steps, from "apply to each" "compose" and "apply to each 2", so I was able to select "varArray" later on at the step "create item". 

    I still, however, receive the following message when I try to save it:

    "Code: InvalidTemplate, Message: "The template validation failed: 'The inputs of template action 'Compose-JSON' at line '1 and column '4055' is invalid. Action 'Auf_alle_anwenden' must be a parent 'foreach' scope of action 'Compose-JSON' to be referenced by 'repeatItems' or 'items' functions.'."."

     

    May it be possible, that you try to contact me or I am contacting you to share the screen an trouble shoot before we are going back and forth?

     

    BTW: You, Sir, are patient... thank you for all the help so far!

     

     

  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on 29 Aug 2022 at 13:06:16
    Re: FORMS info mitigation to lists with multiple choice answers

    Hello @skalinna3 ,

    have you added the Compose action after the "Set variable-Updated varResponsesDef" action?

    MarconettiMarco_0-1661778303798.png

     

    BR,

    Marco

     

  • skalinna3 Profile Picture
    25 on 29 Aug 2022 at 12:58:12
    Re: FORMS info mitigation to lists with multiple choice answers

    Hi Marco,

     

    I did follow your guide as far as I could. One question is popping up my mind, in a questionnaire, with e.g. 3 answers, where does this logic get that it needs to pull the multiple choice answers from question 3?

     

    This is how I set it up at the moment:

    SS 7.jpg

    Wih "create array" = 

    createArray('[',']','"')
    ss8.jpgss9.jpg
    replace(...) = 
    replace(variables('varResponsesDef'), item(), '')

     

    This is 100% according to your guide, where it becomes tricky is:
    The JSON text, can you paste it here for me to copy and paste it in?
    It seems like there are failures: 1. ""The template validation failed: 'The inputs of template action 'Compose-JSON' at line '1 and column '3321' is invalid." and 2. Action 'Auf_alle_anwenden' must be a parent 'foreach' scope of action 'Compose-JSON' to be referenced by 'repeatItems' or 'items' functions.'."

     

    And I don't know why, but I cannot select the varArray in the last step before create an item, see here:

    skalinna3_2-1661777632450.png

     

    It is only open for selection if I change (at the beginning) for "initialize variable-varArray" from array to string but then it is no longer selectable for create an item:

    skalinna3_3-1661777843554.pngskalinna3_4-1661777858528.png

     

    I hope you can help me out, I don't get were it all falls down.

     
     
  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on 29 Aug 2022 at 11:30:57
    Re: FORMS info mitigation to lists with multiple choice answers

    Hello @skalinna3 ,

    please follow the steps in this article:

     

    https://powerautomatejoy.com/2022/08/01/how-to-get-multiple-choice-responses-from-forms-and-put-them-in-sharepoint/

     

    Please let me know if the issue is fixed.

     

    If I have answered your question, please mark my post as Solved.

    If you like my response, please give it a Thumbs Up.

     

    I may not have all the answers, but I'm curious and passionate enough to keep looking for answers and to keep sharing them.

     

    My blog site about Power Automate: https://powerautomatejoy.com/

     

    BR,

    Marco

  • skalinna3 Profile Picture
    25 on 29 Aug 2022 at 10:36:25
    Re: FORMS info mitigation to lists with multiple choice answers

    Hello Marco,

     

    sorry, I was distracted by other daily topics. I used your guide and am currently running into an issue at the following step:

    • "Compose-JSON":

    here I am trying to use your previously shared expression 

    {
    "value": "@{items('Apply_to_each_2')}"
    }

     

    I used the same names in the apply to each parts, so references should be correct, however I got a note stating: 

    SS2.jpg

    This translates to "The expression is not valid."

     

    I am not sure why this is the case. If I used "dynamic content" I am able to select the "apply to each" value, if I only do enter your code manually to that level ("@{items("...")}") , that I try to add the dynamic content into the "..." spacer, it is no longer there.

    I added the text now manually, although I am not quite sure if this works or not.

    ss4.jpg

     

    • Additionally ("Apply to each 2"):

    When I tried the next step, I could not choose "varArray" as shown in your example on your website, it is only showing "varResponsesTemp" and "varResponsesDef". I checked your guidance and recognized that only "strings (Zeichenfolge in German)" are to be selected here, whereas arrays aren't.

     

    ss3.jpg

     

    So I changed the setting of "Initialize variable-varArray" from array to string and was able to select it here. Was the screenshot just outdated?

     

    • "Scope":

    It wasn't particularly mentioned in your text, I just noticed the added function. So I changed the setup to match with yours by adding "Bereich" or "scope" to the flow, it eliminates the error message I receive for flow testing. 

    "Create item":

    I could not select the varArray as dynamic content. So I went back to "Initialize variable-varArray", chose array instead of string, was able to add it in here and left the selection in "Append to array variable-varArray", it was at least not dismissed automatically.

    ss5.jpg

     

    Now, trying to save it, I get the following notice:

    ss6.jpg

    I expected that the JSON part was causing trouble, but I am also stuck with all above.

     

    Please help me figure it out.

  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on 22 Aug 2022 at 14:19:57
    Re: FORMS info mitigation to lists with multiple choice answers

    Hello @skalinna3 ,

    it should be the first one.

    Anyhow, I've updated the article:

    https://powerautomatejoy.com/2022/08/01/how-to-get-multiple-choice-responses-from-forms-and-put-them-in-sharepoint/

     

    If I have answered your question, please mark my post as Solved.
    If you like my response, please give it a Thumbs Up.

    My blog site about Power Automate: https://powerautomatejoy.com/

    BR,

    Marco

  • skalinna3 Profile Picture
    25 on 22 Aug 2022 at 14:14:33
    Re: FORMS info mitigation to lists with multiple choice answers

    Hello Marco,

     

    I followed your instructions of the provided link until step varResponsesDef and started from there on with the guidance you provided here (thank you very very much btw.).

    SH 1.jpg

    A problem occured, renaming the variable "varArray" again, a second time, after using it the first time a few steps before.

    SH 2.jpg

     

    So I tried to use as a title for the action Initialize variable-varArray 2 (marked red) but stayed with varArray (marked green)

    SH 3.jpg

    Going further, instead of updating something, based on the trigger "a new element was created", I chose "create a new element" added everything in as before, used the "varArray" condition but was told that I cannot use "varArray" 2 times. So which one needs to be deleted, the one at the beginning or the one before "apply to each"?

    SH 4.jpg

     

  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on 22 Aug 2022 at 10:13:08
    Re: FORMS info mitigation to lists with multiple choice answers

    Hello @skalinna3 ,

    you can follow the instruction in the following article until the action "Set the “varResponsesDef” variable by adding the “varResponsesTemp” variable value.":

    https://powerautomatejoy.com/2022/08/01/how-to-get-multiple-choice-responses-from-forms-and-put-them-in-sharepoint/

     

    Then:

    1. Add a "Compose" action in which put the following expression:

    split(variables('varResponseDef'),',')

    MarconettiMarco_0-1661162974734.png

    2. Initialize an "Array" variable:

    MarconettiMarco_2-1661163055330.png

     

    3. Add an "Apply to each" control, where put the previous "Compose" outputs as "Select an output from previous steps". Add the "Append to array variable" putting:

    {
    "value": "@{items('Apply_to_each_2')}"
    }

    MarconettiMarco_1-1661163026034.png

    4. Outside the Apply to each loop, update your item putting the array variable in the multiple choice column:

    MarconettiMarco_3-1661163176667.png

     

    If I have answered your question, please mark my post as Solved.
    If you like my response, please give it a Thumbs Up.

    My blog site about Power Automate: https://powerautomatejoy.com/

    BR,

    Marco

     

     

     

  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on 22 Aug 2022 at 10:00:09
    Re: FORMS info mitigation to lists with multiple choice answers

    Hello @skalinna3 ,

    please share the detailed flow in Edit Mode and where you're getting the error.

     

    BR,

    Marco

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete