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 Apps / Removing leading Zeros...
Power Apps
Answered

Removing leading Zeros in PowerApps Gallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Is there a way in PowerApps to remove leading zero's in a gallery and not have to use Power Automate. Pulling in data from SQL DB, there is a text field that has leading zero's in this one column. For example: 000006201 to be 6201. Now, we do sometimes have 000000000 and it just needs to be 0. Is this possible? Thank yoiu

 

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    @Anonymous please try the Int() function:

     

    //This will be 11
    Int("000011")
    
    //This will be 0
    Int("0000")


    If this answers your question, would you be so kind as to accept it as a solution.
    Thanks!

     

  • Rusk Profile Picture
    1,369 Super User 2024 Season 1 on at

    Is it always fixed?  000006201 to 6201 always has 5 zeros?  000000000 to 0 always has 9 zeros?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @LaurensM 

    This fixed it. I was researching but only found Power Automate stuff. I didn't think about the 'Int' function. Thank you so much!! Have a good one.

  • Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    Try adding Text(Value(<<fieldwith0s>>), "#########0")

    That should remove any leading 0's and change all zeros to just 0

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Rusk 

    Thank you for replying. I appreciate it. No, it's not fixed but using the Int functionality worked. Thank you for responding to this post. Have a good one!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Pstork1 
    Thank you for responding to my post. I appreciate it. I fixed it by using the 'Int' functionality. Thank you again. Have a good one.

  • DrCharlesDBA Profile Picture
    13 on at

    Good day thanks for your solution.

    I am also having a similar problem. I am using a hexadecimals RFID keyboard emulator which writes to text of my PowerApps textbox. I wish to know how can I remove a leading zero. I am scanning a 7 digit barcoded RFID but it comes with a leading zero.

    Is there a way I can make the textbox ignore a leading zero on scan or keyboard number typing?
    Kindly help.

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard