cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
glenrennie
New Member

Create email flow adding a decimal place and thirteen zeros - how to remove them?

I have a flow set up to run every Sunday as a 'Recurrence'.

 

The flow gets items from a SharePoint list and then emails various people the data contained within three calculated columns.

 

The calculated columns on SharePoint are 'Number' columns and have been set to zero decimal places.

 

However, when flow creates the email it adds numerous zeros to the figure it's taken from the list. Meaning, for example, that 37 is being shown as 37.0000000000000 on the email.

 

Can someone please assist me by advising how I can set the flow (or the SharePoint list) to only display the whole number, removing the decimal point and the thirteen zeros following it?

 

I have searched this site and others and have attempted various suggestions but none have worked and have either had no impact at all or have caused a flow error when saving or running the flow. I'm going around in circles now.

 

Please note, I'm new to this, so please forgive any apparently 'stupid' questions I might ask!

 

Thanks, Glen.

2 ACCEPTED SOLUTIONS

Accepted Solutions
Jcook
Super User
Super User

Hello @glenrennie 

Use a compose action shape,

Than use the expression:

int()

 

—Josh

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





View solution in original post

RobElliott
Super User
Super User

@glenrennie@Jcook got there before me 😊 It should work fine with an int() expression. I put the calculated column, called Total, into a Compose  called ComposeTotal and used the output of that in another Compose with the expression 

int(outputs('ComposeTotal'))

intCompose.png

And when you run the flow it strips put the decimal point and trailing zeros.

intCompose2.png

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

View solution in original post

11 REPLIES 11
Jcook
Super User
Super User

Hello @glenrennie 

Use a compose action shape,

Than use the expression:

int()

 

—Josh

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





efialttes
Super User
Super User

Hi

As a fast workaround you can try to convert these 'Number' column values into string, and remove the decimal part.

Let's assume you store temporarily one of these Columns value in a variable called auxNumber

Then you can try with the following expression

first(split(string(variables('auxNumber')),'.'))

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



RobElliott
Super User
Super User

@glenrennie@Jcook got there before me 😊 It should work fine with an int() expression. I put the calculated column, called Total, into a Compose  called ComposeTotal and used the output of that in another Compose with the expression 

int(outputs('ComposeTotal'))

intCompose.png

And when you run the flow it strips put the decimal point and trailing zeros.

intCompose2.png

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

Thank you @Jcook , will give this a go now.

Glen 🙂

Thank you @RobElliott, trying this now. 

Glen 🙂

@RobElliott @Jcook 

…..however, I have three calculated columns to consider. The email is a reminder of paid leave days taken, days used and projected days left at the end of the year. So, I have three columns:

  • Used so far in 2020
  • Left to take in 2020
  • Projected days left for 2020

Do I need to create the two 'Compose' actions for each column, or can all three be combined into one?

Thanks, Glen .

Thanks for your suggestion @efialttes 

Much appreciated.

Glen 🙂

@glenrennie 

I would have 3 compose shapes.

 

—Josh

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others


Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





You could possibly combine them but I'd have to think about how. Much easier just to use 2 compose controls for each one.

Rob
Los Gallardos

@Jcook @RobElliott - you guys are stars!

This fixed my issue perfectly, I should've come here first before spending hours driving myself mad! 🙄

Thanks a million!

Glen 🙂

So then what did you put in the email to get the number without trailing zeros?

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.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,650)