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 / Add leading zero to a ...
Power Automate
Unanswered

Add leading zero to a number in Power flow

(1) ShareShare
ReportReport
Posted on by 91

This was used in a "select" step

 

Expression : formatNumber(int(item()['Number']), '0000000')

 

This will add '00' in front of a 5 digit number

Categories:
I have the same question (0)
  • sandeepstw Profile Picture
    312 Moderator on at

    Hi There,

     


    If you're already utilizing the formatNumber function as in the given expression, ensure the second argument represents the desired number of total digits. For instance, if you have a 5-digit number and you want two leading zeros, the format should have 7 characters in total.


    formatNumber(int(item()['Number']), '0000000')


    Make sure item()['Number'] is of type integer. If it's already an integer, the conversion with int() is redundant.

    Using this method will prefix the number with the necessary zeros to ensure the number has a total of 7 digits.

     

    Please give kudos and mark as solution if it helps.  

      

    Thanks, 

    Sandeep Mishra 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard