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

New form, after cancel, displays old list item

While in a SharePoint list, I used the "Customize forms" option to create a PowerApps form.  Note: It is not the same as the standard way of creating the form in PowerApps -- Customize forms lets you display a PowerApps form over the SharePoint list without having to go to the PowerApps website.  Next I created a link on another page so that when the user clicks the link, it opens the custom form.  At the top of the form it automatically shows Save, Cancel, Copy link, and Customize.

The problem is, when I select "Cancel" it briefly populates the new custom form with data from the most recent item in the SharePoint list.  Usually it lasts less than a second, but some users reported that it stays up a long time, long enough to make a screenshot.

Any ideas how to fix?

1 ACCEPTED SOLUTION

Accepted Solutions
grahampasmurf
Level: Powered On

Re: New form, after cancel, displays old list item

I researched your suggestion and had trouble figuring out where to place this code.  The Cancel button was not a Form Control that I created.  Eventually I selected "SharePointIntegration" under the Screens toolbox and it had an "OnCancel" setting.  I changed the code there from

ResetForm(SharePointForm1)

to

NewForm(SharePointForm1)

and that fixed the issue.  It no longer displays other items and it exits the screen.

 

Thank you for the suggestion!

3 REPLIES 3
Community Support Team
Community Support Team

Re: New form, after cancel, displays old list item

Hi @grahampasmurf,

 

This should be related to the ReSetForm() function used under the OnSuccess property of the Form control.

Usually after data submit, Form control would be Reset by the Resetform() funciton, and the Form control would then be switched into Edit Mode, and keeps the record last submitted.

Please consider switch the ReSetForm() function to NewForm() and see if that would help in your scenario:

OnSuccess property:

NewForm(SharePointForm1)

Function reference:

NewForm, ReSetForm function in PowerApps

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
grahampasmurf
Level: Powered On

Re: New form, after cancel, displays old list item

I researched your suggestion and had trouble figuring out where to place this code.  The Cancel button was not a Form Control that I created.  Eventually I selected "SharePointIntegration" under the Screens toolbox and it had an "OnCancel" setting.  I changed the code there from

ResetForm(SharePointForm1)

to

NewForm(SharePointForm1)

and that fixed the issue.  It no longer displays other items and it exits the screen.

 

Thank you for the suggestion!

Community Support Team
Community Support Team

Re: New form, after cancel, displays old list item

Glad to help.

 

Would you please Accept your soution to close this thread?

Which should be helpful for others to find the answer more quickly.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.