cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Charles-v-D
Helper V
Helper V

Adding borders to a table

Hi All,

 

I'm using the "Create HTML table" action, which is being populated with data from an Array. The HTML table is then dropped into a "Send an Email ((v2)" action. The content of the both the e-mail and table is fine.... BUT: the table itself is not shown. I see my text in virtual columns, but I would love to see the borders of each cell in the table... as this make reading the lines easier etc....

 

Is there a way to get this done?

 

Thanks

Regards

Charles

 

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @Charles-v-D 

 

Yes. You can refer to the screenshot below for the same: 

dd.PNG

Code: 

<head>
<style>
table {
  font-family: arial, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

td, th {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 8px;
}

tr:nth-child(even) {
  background-color: #dddddd;
}
</style>
</head>

Output: 

d4.PNG

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

6 REPLIES 6
Jay-Encodian
Super User II
Super User II

Hi @Charles-v-D 

It's fairly simple, you can use the replace function to change the HTML string generated by the 'Create HTML Table' action:

1.png

Expression: replace(body('Create_HTML_table'),'<table>','<table border="1">')

Example output:

4.pngHTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up

yashag2255
Dual Super User II
Dual Super User II

Hi @Charles-v-D 

 

Yes. You can refer to the screenshot below for the same: 

dd.PNG

Code: 

<head>
<style>
table {
  font-family: arial, sans-serif;
  border-collapse: collapse;
  width: 100%;
}

td, th {
  border: 1px solid #dddddd;
  text-align: left;
  padding: 8px;
}

tr:nth-child(even) {
  background-color: #dddddd;
}
</style>
</head>

Output: 

d4.PNG

 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Hi @yashag2255 

 

Thanks for the quick turnaround! I have made an e-mail action exactly like yours but I simply get the whole code as plain text in the e-mail with the border-less table at the end... what am I doing wrong?

 

Regards

Charles

 

Hi @Charles-v-D 

 

Can you share a screenshot of your email action? On that can you check what action you are using and if you have enabled the code editor on the action? 

 

de3.PNG

 

Click the icon to enter code mode. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

@Jay-Encodian  thanks for your help on this. I was able to solve the problem using @yashag2255 approach already... thanks anyway!

@yashag2255 the suggestion to put it into code mode solved it! Thanks!!

 

Additionally. Can you provide coding example on how to set the letter-type and letter-size to Calibri 10 ??

 

Thanks

 

Regards

Charles

 

 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (93,321)