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 / Power Automate - Array...
Power Automate
Answered

Power Automate - Array to add commas between multiple choice answers now won't allow flow to continue if field is left blank

(0) ShareShare
ReportReport
Posted on by

Hi!

I've created a flow that is triggered when a new item is created from a SharePoint list. One action is to 'Send an Email v2' that sends a confirmation back to the person who submitted the entry with a copy of all of their answers. 

 

Three of the fields are multiple-choice and PA was turning on Apply to Each and sending multiple emails for each separate answer for the multiple-choice answers. I used the solution in this post to turn these answer values into variables and add commas between each selected choice so it is readable. https://powerusers.microsoft.com/t5/Building-Flows/How-to-joint-multiple-string-with-comma-in-Apply-to-each-loop/m-p/833296#M116561

 

The problem now is,  one of these multiple-choice fields are not required and when it is left blank, the flow is stopped and won't proceed forward. I've tried going into the "Configure Run After" settings of the actions related the non-required fields and letting it continue if skipped or failed, but that hasn't done the trick. 

 

Any ideas how to make it so it will continue running the flow even if there is no value for array3? Screenshots below of fields related to the non-required field.

Thank you!

ahartsfield_0-1694212906086.png

ahartsfield_1-1694212940308.pngahartsfield_2-1694212992155.png

 

Categories:
I have the same question (0)
  • Verified answer
    Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @ahartsfield 

     

    Pls refer to sample flow for joining values of multiple choice field to a single comma separated string. Here, I am covering the actions which are required after "Get items" and inside "Apply to each action":

     

    Add "Select" action inside "Apply to each" action and pass multiple choice field to it. Here, 'MultiChoiceCol' is the multi choice column in SharePoint list:

    ManishSolanki_0-1694217985115.png

    Next, press 'Switch Map to text mode' button present on the right side of 'Map' parameter:

    ManishSolanki_1-1694218118305.png

    Next, add an expression to get the value of multiple choice column in the "Map" box. Expressions needs to be written in the expression window as shown below:

    ManishSolanki_4-1694218923079.png

     

    Expression used in "Map" property:

    item()?['Value']

     

    Finally, continue inside "Apply to each" add "Compose" action to join all the choice value with comma to make it a single comma separated string. We will make use of expression to do this:

    ManishSolanki_3-1694218399079.png

    Expression used for joining:

    join(body('Select'),', ')

    The output of compose action will give the desired value. If field is empty or no choice is selected, then the output of compose action will give blank value and wouldn't fail.

     

    If you have multiple multichoice fields, then you need to add "Select" and "Compose" action for each field. The value of each field will be collected in the respective compose action which you can further use to send the email.

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • ahartsfield Profile Picture
    on at

    @ManishSolanki 

    Thank you! I've followed your instructions and get all the way to entering the dynamic content into my email field, but there is no output for my new Compose action. I instead get "Current item" under the Apply to Each, which leads to an error:

    ahartsfield_0-1694456759516.png

    I'm going to keep fiddling with it, but if you know how to make the Outputs of my new Compose action show up in my dynamic content, that would be wonderful.

    Thank you!

    ~Amy

  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi Amy,

     

    You may even try the expression to get the output of compose action:

    outputs('Compose')

    where, Compose is the name of the action. If the action name contains white spaces, then it will be reference using underscore, for instance, if compose action name is 'Compose 2' then you can refer it as outputs('Compose_2').

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • ahartsfield Profile Picture
    on at

    @ManishSolanki 

    I tried that both inside and outside of the Apply to Each block. It still wouldn't show up as an option in my dynamic content. However, I added the outputs('Compose') expression directly in my email and it did work. It gave me a whole bunch of extra commas for some reason. So...onto the next domino, but it appears to have gotten all the information to come through, separated by commas.

    Thank you!

  • luizhr Profile Picture
    112 on at

    I also followed the flow suggested, but I am facing the same issue. Could you figure out how to solve this issue @ahartsfield , @ManishSolanki ? For me it's showing all the values in all items (like example below) 

     

    My examples

        "Annual_Pollutant": [
          "CO",
          "PM10, PM2.5",
          "SO2",
          "SO2",
          "SO2",
          "SO2",
          "",
          "",
          "VOC",
          "VOC",
          "VOC",
          "VOC",
          "SO2",
          "VOC",
          "VOC",
          "VOC",
          "VOC",
          "VOC",
          "VOC",
          "VOC",
          "VOC",
          "VOC",
          "VOC",
          "VOC",
          "VOC",
          "",
          "",
          "",
          ""
    and I'd like to see: 
     
    Item 1:  CO
    Item 2: PM10, PM2.5
    and so on..
     
     
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 258 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 198 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard