cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Barber_Chris
Level: Powered On

Format Currency in HTML Table

Hi,

I have a flow that creates a HTML table from a sharepoint list then adds it to an email. The flow works fine and all the data is there but the currency colums display such as 30.0000000000000 with no £ sign. 

 

Can anyone advise me how this would be achieved. 

 

Regards,

Chris

 

 

1.JPGflow.JPG

9 REPLIES 9
Barber_Chris
Level: Powered On

Re: Format Currency in HTML Table

I forgot to mention im looking to reduce the number of decimal places to 2

Dual Super User
Dual Super User

Re: Format Currency in HTML Table

Hi @Barber_Chris 

 

You can initialise a variable and then pass the currency value in that and then use an expression to trim the decimals. Please see the solved thread below for the expression: 

https://powerusers.microsoft.com/t5/Building-Flows/decimal-place/td-p/50303

Rounding currency/ decimals is not available as direct action or function in flow currenlty and you can upvote this idea here: 

https://powerusers.microsoft.com/t5/Flow-Ideas/Currency-and-decimal-format-in-Microsoft-Flows/idi-p/...

 

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!

Community Support Team
Community Support Team

Re: Format Currency in HTML Table

Hi @Barber_Chris ,

 

I assume that the column CIS is a calculated column, I have figured out the following workaround for your scenario, please check it for a reference.

 

Input the following code in the value field of CIS field:

concat(string(float(item()?['cis'])),'£')

1.PNG

 

Best regards,

Mabel  

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Barber_Chris
Level: Powered On

Re: Format Currency in HTML Table

Hi Mabel,

Im getting somewhere following your post thanks. 

 

So I tried as you said with the following expression:- 

 

concat(string(float(item()?['CIS_x0020_on_x0020_Labour'])),'£')

 

 

1.JPGAnd not its displaying like this...

 

Community Support Team
Community Support Team

Re: Format Currency in HTML Table

Hi @Barber_Chris ,

 

What’s your expected result? Could you show me an example?

 

Actually, I am getting the same result with you for the CIS column.

 

However, Flow doesn’t have the same Text function to format a number or a date/time value.

 

Let me see if I could help figure out it for your scenario.

 

Best regards,

Mabel          

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Barber_Chris
Level: Powered On

Re: Format Currency in HTML Table

Hi @v-yamao-msft 

Thanks for ocming back to me so in looking for it to display like this £1000.00

 

Regards,

Chris

Community Support Team
Community Support Team

Re: Format Currency in HTML Table

Hi @Barber_Chris ,

 

Please try with the following code:

 

if(contains(item()?['cis'],'.00'),concat(string(float(item()?['cis'])),'.00£'),concat(string(float(item()?['cis'])),'£'))

1.PNG

 

 

Best regards,

Mabel  

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Barber_Chris
Level: Powered On

Re: Format Currency in HTML Table

Hi @v-yamao-msft ,

Im getting the same outcome. The £ sign is at the end of the number and its not always 2 decimal places. 

 

1.JPG

Community Support Team
Community Support Team

Re: Format Currency in HTML Table

Hi @Barber_Chris ,

 

You may need to modify the function likes below:

if(contains(item()?['cis'],'.00'),concat('£',string(float(item()?['cis'])),'.00'),concat('£',string(float(item()?['cis'])))

However, if you want the end of the number always to be 2, you may need to add more conditions in the flow to check if it has two decimals, if not, format it.

 

Best regards,

Mabel   

       

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

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,025)