I have a Sharepoint text column, "month". It is intended to have 01, 02, 03... 12.
I have a PowerApp, connected to it. The text field to modify this column is working not ideally.
When I enter months 1-9 (1 digit), in the way 01, 02, 03... The EditForm operation is sending 1, 2, 3 instead of what I want. I have tried multiple things to fix this but I cannot get it right.
Any suggestions?
Solved! Go to Solution.
Thanks for your suggestions!
@KennethNicasens. Thanks for your suggestion. But it didn't work.
@mdevaneyYour suggestion/code gets the right format, even just before submitting. I was able to put the output of the box into a variable and it was getting what I wanted. But SharePoint would resist.
I had a problem once, with custom editforms, so I decided to remove the field and place it back again, in order that the data card was not "custom" and was just automatic without any modifications, and that worked. So basically, I think there is a bug when you unlock them, something underneath that makes it work not so well, particularly in this scenario.
Thanks so much for hanging in with me. This was so frustrating!
Use this code in the UPDATE property of the card for Month to show the format you desire
Text(Value(TextInput_Month.Text),"00")
When the data is submitted to SharePoint it will now show "01" for January instead of "1"
---
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."
What I also found is that if you edit the Format option of the textbox you are using to Number he will also just write 01 instead of 1.
Kenneth,
You mean the opposite, right? Do I have to set it up in Number or Text?
W
Can you please confirm the Format property is set to Text? And also, please confirm the Month column in SharePoint is single-line text.
It might be helpful to see the "non-advanced" properties from the right side menu as a screenshot as well 🙂
---
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."
Yes, Sorry in the screenshot I didn't change the value to Number.
If I do this I am only allowed to fill in a Number and if I send this to Sharepoint he will save this as 01
I think I see the problem.
You must change the Default property of DataCard13 to one of these. Try each of them and let me know what works.
Text(Value(ThisItem.Month),"00")
Text(ThisItem.Month,"00")
---
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."
Hi @Wichowich ,
If @mdevaney his solution doesn't work, can you set the format of the box to Number?
---
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."
User | Count |
---|---|
170 | |
95 | |
77 | |
72 | |
59 |
User | Count |
---|---|
215 | |
166 | |
97 | |
95 | |
74 |