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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to clear number "0...
Power Automate
Answered

How to clear number "0" in email notification?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

When i get the number from column in SharePoint List to Send email with option and there are many number "0" at email notification so do you know how to remove it?

NguyenHuu_0-1621845351521.pngNguyenHuu_1-1621845459192.pngNguyenHuu_2-1621845543810.png

if i put number by manual is OK, the number from Formula it will like that.

Thanks

Categories:
  • powercorner Profile Picture
    477 on at

    Hello @NguyenHuu 

     

    its pretty easy. use the expression int() and wrap your sharepoint output into it. So int(total day leave) inside your mail body should fit it.

     

    With regards

    Kevin

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thanks @powercorner ,

    But it can't show the  half day like 0.5 to 0 or 1.5 to 1 

    Thanks.

  • powercorner Profile Picture
    477 on at

    then you can do some math:

     

    div(float(int(mul(YOURFLOAT,10))),10)

     

     

     

    that is

     

    take YOURFLOAT

    multiple by 10

    converting to int

    converting to float (else it became an integer result)

    dividing by 10

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @powercorner ,

    Follow your step: 

    div(float(int(mul(triggerOutputs()?['body/Total_x0020_day_x0020_leave'],10))),10)
    NguyenHuu_1-1621953218492.png

     

     

    and it got problem like this: 

    NguyenHuu_0-1621953045856.png

     

  • powercorner Profile Picture
    477 on at

    Hmm okay then try a different approach with strings. Try this: (the expressions are in the comments)

    powercorner_0-1621955259965.png

    What I basically do is: 


    - I split the float at the dot

    - take the front as it is

    - get the first letter from the back of the float 

    - make it to a string again:

    concat(split(string(variables('FloatNumber')),'.')[0],'.',substring(split(string(variables('FloatNumber')),'.')[1],0,1))

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @powercorner ,

    i follow your steps:

    2.PNG3.PNG

     

    and get the error:

     

    1.PNG

  • powercorner Profile Picture
    477 on at

    I assumed you have a number coming from the SharePoint but its a string. so you can leave out the float variable initialization: begin with the splitting cause you already have a string.

     

    concat(split(YOURSPVALUE,'.')[0],'.',substring(split(YOURSPVALUE,'.')[1],0,1))

     

    btw why did you save a number of days in a string in the SP column? That sounds not good.

     

    With regards

    Kevin

     

     

     

     

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @powercorner ,

    The number from Formula : =IF(Halfday=TRUE,((DATEDIF(StartDate,EndDate,"D"))-INT(DATEDIF(StartDate,EndDate,"D")/7)*2-IF(WEEKDAY(EndDate)<WEEKDAY(StartDate),2,IF(OR(WEEKDAY(EndDate)=7,WEEKDAY(StartDate)=1),1,0))+1)-0.5,((DATEDIF(StartDate,EndDate,"D"))-INT(DATEDIF(StartDate,EndDate,"D")/7)*2-IF(WEEKDAY(EndDate)<WEEKDAY(StartDate),2,IF(OR(WEEKDAY(EndDate)=7,WEEKDAY(StartDate)=1),1,0))+1))

     

    NguyenHuu_0-1622040926754.png

    NguyenHuu_1-1622041157599.png

     

    so can you share me detail how to fix it?

    Thanks

  • Verified answer
    powercorner Profile Picture
    477 on at

    hello @Anonymous ,

     

    I built up the whole pipeline for you. Here it is (kudoe and solution wanted :P):

    powercorner_0-1622051370252.png

    I used exactly your formula for the "Total day leave" and got only 1 decimal place after the dot.

     

    Then in the flow:

    powercorner_1-1622051719699.png

     

    my expression to calculate is:

    float(concat(split(triggerOutputs()?['body/Total_x0020_day_x0020_leave'],'.')[0],'.',substring(split(triggerOutputs()?['body/Total_x0020_day_x0020_leave'],'.')[1],0,1)))

     

    And it works like charm

     

    With regards

    Kevin

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank so much @powercorner ,

    it work 🙂

    Thanks.

    Huu.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard