cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
flow2_usa
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
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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (8,397)