cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SaifAli
Helper III
Helper III

Formatting the Array

Hi Team,

 

So I have a requirement in which a sub-requirement is to fetch the data from One drive file and email it to an individual. 

 

So far I have used get file content and converted it from base64 to String.

 

The problem is the data I am fetching from One drive is a JSON string and after converting it to a normal string and sending in email it looks as below : 

 

["abc@xyz.com ","bcd@xyz.com ","cde@xyz.com ",".... and so on ] which is difficult to read

 

I'm actually looking it to format in below format :

 

["abc@xyz.com ",

"bcd@xyz.com ",

"cde@xyz.com ","

.... and so on ] which would be better to read

 

I have also tried to convert it into an array , but still same 😞

 

Could someone please help ???

Thanks in advance 🙂

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Paulie78
Super User
Super User

It seems to me that you are trying to create an array, out of something which is already an array:

["abc@xyz.com ","bcd@xyz.com ","cde@xyz.com"]

Is already an array, so no need to convert it. Check out this flow:

emailToHTML.PNG

Produces this:

emailToHTMLresult.PNG

View solution in original post

4 REPLIES 4
Paulie78
Super User
Super User

Use Create HTML Table action and use the:

["abc@xyz.com ","bcd@xyz.com ","cde@xyz.com "] 

as the input for the table. Then insert the table in to an email.

HI Paulie ,

 

Thanks for your solution,

 

Unfortunately i'm still facing this error :

 

The property 'columns' must be specified unless the 'from' property value is an array of objects.

 

below you can find a screenshot of my flow i'm just using a compose action in which i'm using "createarray()" function and then passing that array to "create HTML Table"

 

SaifAli_0-1606815553370.png

I've tried using the solution given here : Solved: Create HTML table - BadRequest. The property 'col... - Power Platform Community (microsoft.c...

 

but still no luck 😞

 

Can you suggest any conversion i'm missing?

Paulie78
Super User
Super User

It seems to me that you are trying to create an array, out of something which is already an array:

["abc@xyz.com ","bcd@xyz.com ","cde@xyz.com"]

Is already an array, so no need to convert it. Check out this flow:

emailToHTML.PNG

Produces this:

emailToHTMLresult.PNG

Thanks , 

 

I was not actually familiar with how to use create HTML Table action. I tried passing "custom" in column option and providing header and "item()" as value and it worked 🙂 as suggested by you.

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,668)