cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Pranav_Shroti
Level: Powered On

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

Highlighted
Microsoft Employee

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,354)