cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RussellGove
Level 8

Clear fields after patching sharepoint list

So I generated a mobile app to update a sharepoint list.  The list has  bunch of fields so I needed to separate the app to have multiple input  forms as noted on other posts here..  On the final form I do a Patch to update the sharepoint list data. 

 

The issue is that when a user goes in to enter the SECOND item thoug the app,  the fields on the screen are still showing the values from the previous record he entered. I read up waht I could on the form  behaviors. 

 

The Plus icon on the Gallery Page runs the script NewForm(EditFOrm1).  The Docs Say The NewForm function changes the Form control's mode to FormMode.New. In this mode, the contents of the Form control's Item property are ignored, and the default values of the Form's DataSource property populate the form. If the SubmitForm function runs when the form is in this mode, a record is created, not changed.

 

Why Then does my Edit form show the values from the previously entered record. This doies NOT seem to happen with the auto genreated app that uses the submit instead of patch, so i suspect it has something to do with that.

 

Any Ideas?

 

 

3 REPLIES 3
RussellGove
Level 8

Re: Clear fields after patching sharepoint list

Figured it out.... I need to do ResetFOrm() on all the forms after I patch

RussellGove
Level 8

Re: Clear fields after patching sharepoint list

 
mbrocchi1
Level: Powered On

Re: Clear fields after patching sharepoint list

I've posted several videos on this subject. In a nutshell, use the Reset(fieldname) after your patch function.

 

Save to SharePoint in PowerApps