cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Help Converting MS Forms Array to Bullets

Hello,

 

I’m using the “Send an Outlook email for each Microsoft Forms survey response” Flow template and I would like to convert the arrays sent in the form to bullets (unordered list). 

 

flow.jpg

 

For example, the form contents currently come through like this:

 

Name: ["Bill","Robert","Paul"]

 

And I’d like to convert to this:

 

  • Bill
  • Robert
  • Paul

 

Following a few examples on the Internet, I figured I’d take the following approach:

 

  1. Wrap the entire field name with <ul></ul> in my email source code (placing the output in-between)
  2. Next I would use string replacement to swap the brackets [] with <li>’s and remove the double quotes using the 3 Compose functions below:

 

The expression in Compose is: replace(body('When_a_new_response_is_submitted')?['r6944a0257ae344fc8c35bd2a7cf1363e'],'["','<li>')
The expression in Compose 2 is: replace(outputs('Compose'),'"]','</li>')
The expression in Compose 3 is: replace(outputs('Compose_2'),'","','</li><li>')

 

My first issue is I keep getting the error below (in two different browsers and clearing cache).

 

The template validation failed: 'The action(s) 'When_a_new_response_is_submitted' referenced by 'inputs' in action 'Compose' are not defined in the template.'.

 

My second question is, it this the best way to go about this?  Is there a built-in method or more efficient method of doing this?  Also, since I can’t get past the initial error, I’m not sure whether what I have will actually work so any thought/feedback anyone can provide would be helpful.

 

Thanks

 

 

1 REPLY 1
Highlighted
Dual Super User
Dual Super User

Re: Help Converting MS Forms Array to Bullets

Hi @flow2_usa 

 

the response ["Bill","Robert","Paul"] is an array

 

so you would have to first loop through the array put it in a text string

may be something like

 

Bill,Robert,Paul

 

and then decorate it with <ul> and <li>

 

This will be a lot of work

 

No easy way around this

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (4,357)