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

Try to create a html table with picture

Hi, I have items from a request and I'm trying to convert it as a pdf.

Word template does not allow nested pictures, so I use the onedrive connector.

 

My issue is that I try to make it with html before

 

- on my dataverse entity I have the short URL of the picture.

- I get file content with that short URL

- I add any object in an array using dataUri(getfilecontent body) with html injections

- I create a HTML table

- finaly create my file

 

this is a short screenshot of my flow

Capture.PNG

 

this is my result:

Capture2.PNG

How could I make it works??

word template is no longer a solution (loosing 2 days and have seen that nested pictures don't works).

 

Thank you in advance for your help

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Kesh,

 

You could try this method:

1. Append the table tags and image content into the test variable:

<tr>
  <td>6B2C</td>
  <td>"<img src='@{dataUri(outputs('Get_file_content_using_path')?['body'])}' width='128' height='128'>"</td>
</tr>

2. Then convert the array into a string by using Join action, I use the blank space as a seperator:

3. Format the table HTML as below:

<body>

<table style="width:100%">
  <tr>
    <th>Column1</th>
    <th>Image</th>
  </tr>
@{body('Join')}
</table>

Screenshot 2021-03-03 135911.jpg

 

Screenshot 2021-03-03 140033.jpgScreenshot 2021-03-03 140020.jpg

 

Run result:

Screenshot 2021-03-03 140628.jpg

 

 

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-litu-msft
Community Support
Community Support

Hi @Kesh,

 

You could try this method:

1. Append the table tags and image content into the test variable:

<tr>
  <td>6B2C</td>
  <td>"<img src='@{dataUri(outputs('Get_file_content_using_path')?['body'])}' width='128' height='128'>"</td>
</tr>

2. Then convert the array into a string by using Join action, I use the blank space as a seperator:

3. Format the table HTML as below:

<body>

<table style="width:100%">
  <tr>
    <th>Column1</th>
    <th>Image</th>
  </tr>
@{body('Join')}
</table>

Screenshot 2021-03-03 135911.jpg

 

Screenshot 2021-03-03 140033.jpgScreenshot 2021-03-03 140020.jpg

 

Run result:

Screenshot 2021-03-03 140628.jpg

 

 

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (63,408)