cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Powerapps Form - retain leading zeros

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

35 REPLIES 35
Anonymous
Not applicable

Hi,

 

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

@Anonymous 

One more idea.  Can you please share the code used in the Update property of SortCode_DataCard1?

 

The Update property controls what is being submittd to SP.

Anonymous
Not applicable

Sorry, but where do I find the update property? 

mdevaney
Super User III
Super User III

img2.png

Anonymous
Not applicable

Capture.JPG

@Anonymous 

Replace your code with to have the text show in SharePoint exactly as input in PowerApps

DataCardValue12.Text

 

Or if you want exactly 5 leading zeros do this instead

Text(Value(DataCardValue12.Text),"00000")

 

---
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." 

Hello,

 

there is bug related to language, you may face the issue, as I see red cross next to the field

 

if you insert some test label and you put in text suggested code 

 

Text(Value(TextInput1.Text),"000000")

 

do you get an error? If not what is error next to the fields?

 

e.g. in Czech you need use

Text(Value(TextInput1.Text),"[$-cs-CZ]000000","cs-CZ")

 

otherwise the "conversion" does not work....

 

 

 

...

 

Anonymous
Not applicable

I did as you suggested but still no good. At a lost.

Anonymous
Not applicable

Capture.JPGCapture2.JPG

Helpful resources

Announcements
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

secondImage

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

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (22,493)