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

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 176 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 96 Super User 2026 Season 1

Last 30 days Overall leaderboard