Forum Discussion

src2021's avatar
src2021
Copper Contributor
Dec 21, 2021

Some Form questions are getting brackets [ ] around answers, \n at the end, and/or <br> at the end.

I have Form that triggers a flow when submitted. That flow puts the Form data into a SharePoint list. There's a couple questions on the form that consistently get brackets ["answer"] around the answe...
  • RobElliott's avatar
    RobElliott
    Dec 27, 2021

    src2021 My apologies for the delay, I got horribly tied up last week with testing & delivering a Power Apps app before our company closed for Christmas.

     

    In this example our form is as follows and allows the user to register for 1 or more events:

     

    As normal in the flow, start with the Forms "when a new response is submitted" trigger and the "get response details" action. 

     

     

    Save it at this point and run it. You will need to get the id of the question where you were asking the multi-choice question in the form. Copy that ID.

     

     

    Next, add a Compose action and in the expression tab enter the expression below, changing my question  ID to your one that you've just copied. The expression will strip out the brackets and quotes and replace them with nothing:

     

    replace(replace(replace(body('Get_response_details')?['r840e31f73133432692afb19370c0ffea'],']',''),'[',''),'"','')

     

    Then you can just create the item in your list, using the outputs of the compose above:

     And this is the result.

     

    Come back with any questions about this.

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User

Resources