cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rsparks
Level: Powered On

Forms containing a 0 by default, rather than being blank

I've got a form that pulls data and spit it out into a sharepoint list. I changed the column type of a few fields in the Sharepoint list to be text rather than number, so that I could limit the number of characters put into the field.

 

But now after I've done that, all of the fields linked to the columns that I changed from number to text now contain a 0 when you open the form rather than being empty. I changed the column types back to number, and there is no default value, but it's still happening. How can I revert the fields back to being blank by default?

 

If I'm desparate I can just throw a blank text input on top of the field to feed it data, but there are a lot of fields that will need changing and I'd rather just fix the issue. 

1 ACCEPTED SOLUTION

Accepted Solutions
rsparks
Level: Powered On

Re: Forms containing a 0 by default, rather than being blank

Refreshing the data sources seemed to fix the issue while I was in the Powerapps editor, but it didn't seem to fix the live version. 

 

I instead just removed the "Parent.Default" from each field and that seemed to fix the issue. 

View solution in original post

3 REPLIES 3

Re: Forms containing a 0 by default, rather than being blank

Its surprising that in your case this is happening. Beause I tried the exact same thing with SharePoint.

-Created a custom list

-Created a column with datatype number (whole number with no deciaml places)

-Addeded values - numbers are allowed and saved

-Changed the datatype to Single Line Text

-Added Values - now allowing text still using powerapps

-Added Same column again on form with new datatype

-Old data card is still allowing only numbers

-Newly placed card(same field) allowing text and behaving exepcted...

 

My conclusion: Once you change the datatype, PowerApps is not able to change the card datatype, it is still pointing to the old data type and not updating to new datatype. I beleive thats  a bug.

 Perhaps you will have to do the same... remove the earlier card and add it again. It will work.

 

3.PNG

Microsoft Paul_C
Microsoft

Re: Forms containing a 0 by default, rather than being blank

Thanks for reaching out!

 

I've tried the scenario:

  • Add a new SharePoint list with columns Title (text) and TargetField (number, no decimals).
  • Add a few records to the list.
  • Create a new PowerApp from Scratch, add an Edit Form and connect it to the SharePoint list.
  • Add a gallery and configure it to show and allow selecting the records from SharePoint.
  • Set Form1.item = Gallery1.Selected, unlock the card for TargetField, and change the Format of the Text Input control to Text.
  • Add a Button with OnSelect = SubmitForm(Gallery1)

I then tried editing a record and clicking submit, and the value updated in the gallery as expected. (So far so good!) Then, I continued:

  • Change the type of the TargetField column in SharePoint to single line of text.
  • Try to edit a record in PowerApps and submit.

At this point, the record I submited seemingly lost the value for TargetField from the Text Input and the Gallery. Not so good.

However, I went View -> Data sources, and refreshed my data sources, and everything started working again as expected. Have you tried refreshing the data source in PowerApps?

 

I think the scenario I tried is likely different, since I was editing records and not adding new ones. But, perhaps refreshing the data source is still the answer.

 

Thanks,

- Paul C.
Software Engineer on PowerApps
rsparks
Level: Powered On

Re: Forms containing a 0 by default, rather than being blank

Refreshing the data sources seemed to fix the issue while I was in the Powerapps editor, but it didn't seem to fix the live version. 

 

I instead just removed the "Parent.Default" from each field and that seemed to fix the issue. 

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,304)