web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Thousand separator ema...
Power Automate
Unanswered

Thousand separator email body HTML

(0) ShareShare
ReportReport
Posted on by 78

Good day, 


I have a flow taking information from a SQL view and based on a condition creates an notification email with a html table in the body. Howerver I have number fields in the table that I would like to be displayed with a comma as thousand seperator. 
Picture1.jpg

I removed a few lines from the table to make it shorted/more readable, but below the code from the body in power automate

<style type="text/css">
.auto-style1 {
width: max-content;
}
.auto-style2 {
width: max-content;
border: 2px solid black;

}
}
.auto-style3 {
width: max-content;
text-decoration: underline;
 font-weight: bold;
font-size: 25px;
}
}
.auto-style4 {
width: max-content;
text-decoration: underline;
font-size: 15px;
}

</style>
<table class="auto-style1">
<tr>

<td class="auto-style4"><strong>Customer: @{items('Apply_to_each_2')?['Name']}</strong></td>

</table>

</style>
<table class="auto-style1">
<tr>
<tr>
<td class="auto-style2">RepName</td>
<td class="auto-style2">@{items('Apply_to_each_2')?['RepName']}</td>
</tr>
<tr>
<td class="auto-style2">Reports to</td>
<td class="auto-style2">@{items('Apply_to_each_2')?['REPORTS_TO_NAME']}</td>
</tr>

<tr>
<td class="auto-style2">Available Balance</td>
<td class="auto-style2">R@{items('Apply_to_each_2')?['AvailableBalance']}</td>
</tr>



</table>


Table in email look as follows:
Picture3.jpg

I did a test with the following and it seems to convert, but not sure how to join it with table:

<html>
 <body onload="separateNumber()">
 <script type="text/javascript">
 function separateNumber() 
		{
 givenNumber = 123456789;
 
 nfObject = new Intl.NumberFormat('en-US');
 output = nfObject.format(givenNumber);
 
 document.querySelector('.output').textContent = output;
 
 }
 </script>
 
 <p><span class="output"></span>
 
 </p>
 
 

 </body>
 
 </html>

 

I've tried formating at source but the running into data format /numeric/string issues. 

 

Any one perhaps with an example on how to achieve the thousand seperator? 

 

Kind Regards

 

Categories:
I have the same question (0)
  • Verified answer
    grantjenkins Profile Picture
    11,063 Moderator on at
    Re: Thousand separator email body HTML

    Have a look at Format number. There is a connector, or you can use the expression. See examples below.

     

    The Format used here is N0 which will convert it to a number with commas, and 0 decimal places.

    grantjenkins_0-1673961490335.png

     

    The expression used in the Compose is below. The same as above, except this will give us 2 decimal places (default).

    formatNumber(123456789, 'N', 'en-US')

    grantjenkins_1-1673961554984.png

     

    grantjenkins_2-1673961594605.png

  • Orvyn Profile Picture
    78 on at
    Re: Thousand separator email body HTML

    @grantjenkins - many thanks, if others users view the solution, I would like to add that I tried it before but the adding part didnt work, however after a couple of tries I manage to include it before the email message. Many thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard