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

Number format in HTML table to send in email

Hi everybody,

 

I create a flow that gets data from D365 Finance and Operations and send emails to managers.

Here is an email example:

 

2021-01-11_18-12-49.png

 

 

 

 

 

 

As you can see I send the Net amount could be easier to read if I format it as maybe: 218 174 €.

I saw and read the format options here: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings#code-try...

I can use, for example: 

formatNumber(variables('myFloat), 'N', 'en-US')

The main issue is that the data I want to format (the line net amount) can't be added in the formatNumber function... but only the body or value of the PO lines details (from Finance and Operations).

I can customise the columns of the table as wanted, with the net amount... but without formatting it 😞

2021-01-11_19-18-51.png

Here is the email action, where I can only put the Outputs of my action 'Create HTML Table':

2021-01-11_19-22-10.png

 

 

Can anyone give me tips on how I can handle this format number?

 

Thanks,

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Frog64,

 

You could use the expression item()?['columnName'] to get a specified column value of current item, for example:

item()?['Net_Amount']

Then if you want to convert the number to a monetary unit of the euro, the format specifier should be "C" or "c", and the symbol should be fr-FR:

formatNumber(item()?['Net_Amount'], 'C', 'fr-FR')

Screenshot 2021-01-12 144436.jpg

 

Result:

Screenshot 2021-01-12 145151.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

3 REPLIES 3
v-litu-msft
Community Support
Community Support

Hi @Frog64,

 

You could use the expression item()?['columnName'] to get a specified column value of current item, for example:

item()?['Net_Amount']

Then if you want to convert the number to a monetary unit of the euro, the format specifier should be "C" or "c", and the symbol should be fr-FR:

formatNumber(item()?['Net_Amount'], 'C', 'fr-FR')

Screenshot 2021-01-12 144436.jpg

 

Result:

Screenshot 2021-01-12 145151.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.

Frog64
Helper III
Helper III

It solves my issue, thanks a lot.

Pow3rUs3r
New Member

I am still fairly new to power automate and learning daily. I am not sure how to apply this solution to my flow. I really need to get rid of these trailing zeros. Does the number of decimal places for the calculated columns in my list matter? If not, how do I apply your solution to my flow. Thanks in advance!

SharePoint list calculated column settings:

Pow3rUs3r_1-1651687339891.png

Flow:

Pow3rUs3r_2-1651687402753.png

 

 

HTML table in Email:

Pow3rUs3r_0-1651685551924.png

 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,300)