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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Powerapps Form - retai...
Power Apps
Answered

Powerapps Form - retain leading zeros

(0) ShareShare
ReportReport
Posted on by

Hi,

 

Can someone please help.

 

I have created a form in Powerapps which once submitted, a new item is created in a Sharepoint list. Two of the fields within the form requires the user to input bank sort code and account number. In some cases, the sort code and account number will begin with zeros but when the item is created in the Sharepoint list, it does not bring over any leading zeros. I know its not an issue with Sharepoint as when an item is created directly on Sharepoint, the fields show the leading zeros. I have tried changing the format from number to text in Powerapps but doesn't resolve the issue.

 

Many Thanks

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,989 Moderator on at
    Please try the text function

    Example for 5 decimal places:
    Text(your_fieldname,”00000”)
  • Community Power Platform Member Profile Picture
    on at

    Hi,

     

    I tried this but doesn't seem to work. Just to make sure I am inserting this in the correct field, can you please clarify where I should be inserting this formula? is it in the Design - Format field within the Powerapps properties?

     

    Many Thanks

  • mdevaney Profile Picture
    29,989 Moderator on at
    You’d want to use code like this in the Default property of the card

    Text(ThisItem.your_fieldname,”00000”)
  • Community Power Platform Member Profile Picture
    on at

    Thanks but this doesn't seem to work either.

  • mdevaney Profile Picture
    29,989 Moderator on at

    @Anonymous 

    Can you please take a screenshot showing your full workspace.  Make sure I can see the Card name and show the Default property in the screenshot.

     

    Also, what is the data type of the column in SharePoint for account number?

  • Community Power Platform Member Profile Picture
    on at

    Here is a screenshot. The Sharepoint column is set to single line of text.

     

    Capture.JPG

     

     

  • mdevaney Profile Picture
    29,989 Moderator on at

    @Anonymous 

    I see the issue thanks to your screenshot.

     

    Please retype the double quotes in your formula they are the problem.  Sometimes you cannot copy + paste functions with double quotes from the web browser because they will not appear properly in PowerApps.

  • Community Power Platform Member Profile Picture
    on at

    Thanks, however, this hasn't solved the problem, the leading zeros are still not present in my sharepoint list. 

     

    Any other suggestions?

     

    Many Thanks

  • mdevaney Profile Picture
    29,989 Moderator on at

    @Anonymous 

    Well, if you want to have leading zeros showing in your actual SharePoint list then you'll just have to change your SharePoint column to single-line text.  You can't submit a number to SharePoint via PowerApps having leading zeros.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

     

  • Community Power Platform Member Profile Picture
    on at

    Hi,

     

    My sharepoint list is already configured to single line text and Powerapps is also set to text format. Confused.

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard