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.
Solved! Go to Solution.
@mdevaney Problem is that when the column is initially "Number" it still behaves as number in the form within PA, even you change it in SPO to text, deleting within form re-adding does not work. However patch works fine, with changed column, so it was only to confirm issue with the form.
I see that @Anonymous already changed the format in form, but it does not work either, since third record (on the screenshot) is column Number changed to text within form in PA....
So my only idea is, to replace the column (in SPO) with new column which is text from the beggining, if it is possible of course, I'm trying to figure out how to change field type in existing form, but still nothing works.
1) I removed column "Sort number" (just Number in my case) from the form
2) added new column in SPO
3) refreshed source
and now is field Number changed to text in PA as well.
So observation is:
When nothing except the type of your column changes in SPO, source refresh does not work (type of the field is somehow changed, but not in the way you would expect ... it still behaves as number.
Same is it when you keep the fields on the form it changes the field in certain way, but again not in the correct way.
BUT when you
1) Remove changed fields from the form
2) add new column to the list
3) perform refresh of the source
then the datatype is changed in the form fields as well and now when you add back to the form it it will do the exactly what you want.
Hi @Anonymous ,
I have made a test on my side, and don't have the issue that you mentioned. Please make sure that you have converted the "Sort Code" and "Account Number" from Number type to Text type in your SP List already.
Please consider configure the Update property of the "Sort Code" and "Account Number" data card in your Edit form to following:
Set the Update property of the "Sort Code" Data card in your Edit form to following:
Concat(FirstN(["0","0","0","0","0","0","0","0","0","0"], CountIf(Split(DataCardValue12.Text, ""), Result="0")), Value) & Value(DataCardValue12.Text)
Set the Update property of the "Account Number" Data card in your Edit form to following:
Concat(FirstN(["0","0","0","0","0","0","0","0","0","0"], CountIf(Split(DataCardValue13.Text, ""), Result="0")), Value) & Value(DataCardValue13.Text)
Note: If you have made some changes in your SP List itself, please consider refresh the SP List connection in your app manually.
Please take a try with above solution, then check if the issue is solved.
Check out new user group experience and if you are a leader please create your group
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Don't miss the call this month on June 16th - 8a PDT