Showing results for 
Search instead for 
Did you mean: 
Not applicable

Powerapps Form - retain leading zeros



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



I am officially out of ideas here.  Sorry, but maybe @TomasZubov can take a shot at the problem.

Not applicable

Appreciate your help, just a pity we couldn't find a resolution.



@mdevaney  not really all you did is correct and the bug was the only idea 

@Anonymous if you test simple patch does it work?



Patch(TheList;Defaults(TheList);{Title:"Number with zeros";'Sort code':DataCardValue12.Text})


is it with zeros? I did the test and except the bug I mentioned, everything works just fine and only thing that cuts 0 is when column in SPO is set as number...



screenshot from SPOscreenshot from SPO

Not applicable

Where do I insert the patch? and where you reference 'The list', is this the sharepoint list name? Sorry, as you can tell, I am new to this and don't full understand.

TheList -  is your SharePoint List name

and in {} is ColumnName:Value


just add button (just for test) and add modified line I sent in onSelect  property, then select the button ....


but first can you send me screenshot of fields deffinition for your form? I want to see fields you have problem with 

sorry for czechsorry for czech


Not applicable

Here is a screenshot


I need screenshot when you press "Edit fields"image.png


highlighted area 

Not applicable


Not applicable

This is what I get when I insert the patch




You'd have to figure simply deleting and re-adding the 'Sort Code' card would work at this point too right?  Maybe something to try after the PATCH idea.

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group


Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (25,140)