cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

PowerApps-SharePoint forcing a text field to become a number

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: PowerApps-SharePoint forcing a text field to become a number

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!

View solution in original post

10 REPLIES 10
Highlighted
Super User
Super User

Re: PowerApps-SharePoint forcing a text field to become a number

@Wichowich 

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

Highlighted
Resolver III
Resolver III

Re: PowerApps-SharePoint forcing a text field to become a number

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.

2020-02-14 14_55_17-Workspaces on Workspace forms - Power Apps.png

Highlighted
Frequent Visitor

Re: PowerApps-SharePoint forcing a text field to become a number

Hi,

 

I have tried what you suggested, but it is resisting to this. Any thoughts?

 

W

 

 
Highlighted
Frequent Visitor

Re: PowerApps-SharePoint forcing a text field to become a number

Kenneth,

 

You mean the opposite, right? Do I have to set it up in Number or Text?

 

W

Highlighted
Super User
Super User

Re: PowerApps-SharePoint forcing a text field to become a number

@Wichowich 

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

Highlighted
Resolver III
Resolver III

Re: PowerApps-SharePoint forcing a text field to become a number

@Wichowich 

 

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

Highlighted
Frequent Visitor

Re: PowerApps-SharePoint forcing a text field to become a number

Hi  @mdevaney,

 

SharePoint column set to single line text. And format of box set to text format.

 

 

Highlighted
Super User
Super User

Re: PowerApps-SharePoint forcing a text field to become a number

@Wichowich 

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

Highlighted
Resolver III
Resolver III

Re: PowerApps-SharePoint forcing a text field to become a number

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

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,251)