cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Henryed07
Advocate II
Advocate II

Formatting Numbers from SharePoint list

When the flow gets the data from a calulated field in a SharePoint list it displays all the decimal points in the email.

 

Then Sharepoint column has got the decimal point set to 2, but it will display: 41.000000000000000000  in the email.

 

How do I make sure it only displays 2 decimal points?

 

Thanks

4 REPLIES 4
v-micsh-msft
Community Support
Community Support

Hi Henryed07,

 

I have had this work with the following formula:

 

"@{float(triggerBody()?['Result'])}"

 

See the image as a reference:

29.PNG

 

The Result is the calculated column name in my testing sharepoint list, just replace it with the proper column name of your sharepoint list calculated column name, it should work.

 

"@{float(triggerBody()?['ColumnnameHere'])}"

 

Paste this code directly into the Body Box.

See the results:

30.PNG

Microsoft Flow is built on top of Azure Logic App, so the Workflow Definition Language should also work here. But currenlty there is lacking documentation regarding how to write the formula in Microsoft Flow.

You may try to submit idea on this topic.

Regards

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

Hi,

 

Thanks for the help, however I am unable to get that working this is the error:

 

Unable to process template language expressions in action 'Send_an_email' inputs at line '1' and column '1966': 'The template language function 'float' was invoked with an invalid parameter. The value cannot be converted to the target type.'.

 

It's a Calculated from other currency values and this is as a Number with even with it set to currency and 2 decimal it fails...

 

Will try another field in the meantime.

Hi Henryed07,

 

What is your current situation?

I also tested with calculated fields in SharePoint, would you please share your flow screenshot here?

So that I could check and see what I could suggest.

Regards

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

Hi

 

Below are the screen shots, the highlighted section is the field from sharepoint in the Flow. Below that is the SharePoint column with the settings.

If you need anything else then let me know

flow.PNGsharepointlist.PNG

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,760)