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

Edit Form retains value from cache

Hello,


I have an edit form and after a user submits the data, for e.g. change owner to Max and submits the form, the form is updated without any issue.

 

But when the same user goes to next row/record in the same session where the owner is John, the system automatically shows Max as a value for field owner, is there a way to clear the cache on the next record entry?

 

Thanks

Bazz

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-xida-msft
Community Support
Community Support

HI @bazz12 ,

Could you please share a bit more about your issue?

Which form do you create? A Edit form in standalone canvas app or a custom form in SP list?

 

1. If the form that you mentioned is a Edit form in your canvas app, please consider take a try with the following workaround:

Set the OnSelect property of the "Edit" button (click it to navigate to your Edit screen) to following:

Navigate(EditScreen, ScreenTransition.None);
ResetForm(EditForm1);
EditForm(EditForm1)

Set the Item property of the Edit form to following:

BrowseGallery.Selected

 

2. If the form that you mentioned is the custom form in your SP list, please consider take a try with the following workaround:

Set the OnEdit property of the SharePointIntegration control to following:

Refresh('YourSPList');   /* <-- add this formula */
ResetForm(SharePointForm1); /* <-- add this formula */ EditForm(SharePointForm1)

Set the OnNew property of the SharePointIntegration control to following:

Refresh('YourSPList');
ResetForm(SharePointForm1); /* <-- add this formula */ NewForm(SharePointForm1)

Set the OnView property of the SharePointIntegration control to following:

Refresh('YourSPList');
ResetForm(SharePointForm1); /* <-- add this formula */ ViewForm(SharePointForm1)

then re-publish your custom form to your SP list, then check if the issue is solved.

If the issue still exists, please consider re-move the custom form from your SP list, then re-create a new one for it, check if the issue still exists.

 

Best regards,

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

View solution in original post

juphi17
Microsoft
Microsoft

I was having this issue too, but mostly fixed it by changing the default mode of the form to New.  This really should be fixed by default in all apps tbh.  Seeing old cached data in forms (both when viewing records, editing records and even new records) is just silly and annoying. InfoPath never had that issue.  Hopefully this gets fixed in an upcoming update so that we don't have to do this everytime we create an app.

View solution in original post

5 REPLIES 5
LRVinNC
Resident Rockstar
Resident Rockstar

If you want to reset all the values on the form you can use ResetForm().
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-form

If you want to reset only specific controls within the form you can use Reset.

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-reset

LRVinNC

------------------
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
v-xida-msft
Community Support
Community Support

HI @bazz12 ,

Could you please share a bit more about your issue?

Which form do you create? A Edit form in standalone canvas app or a custom form in SP list?

 

1. If the form that you mentioned is a Edit form in your canvas app, please consider take a try with the following workaround:

Set the OnSelect property of the "Edit" button (click it to navigate to your Edit screen) to following:

Navigate(EditScreen, ScreenTransition.None);
ResetForm(EditForm1);
EditForm(EditForm1)

Set the Item property of the Edit form to following:

BrowseGallery.Selected

 

2. If the form that you mentioned is the custom form in your SP list, please consider take a try with the following workaround:

Set the OnEdit property of the SharePointIntegration control to following:

Refresh('YourSPList');   /* <-- add this formula */
ResetForm(SharePointForm1); /* <-- add this formula */ EditForm(SharePointForm1)

Set the OnNew property of the SharePointIntegration control to following:

Refresh('YourSPList');
ResetForm(SharePointForm1); /* <-- add this formula */ NewForm(SharePointForm1)

Set the OnView property of the SharePointIntegration control to following:

Refresh('YourSPList');
ResetForm(SharePointForm1); /* <-- add this formula */ ViewForm(SharePointForm1)

then re-publish your custom form to your SP list, then check if the issue is solved.

If the issue still exists, please consider re-move the custom form from your SP list, then re-create a new one for it, check if the issue still exists.

 

Best regards,

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

I was having this issue too, but mostly fixed it by changing the default mode of the form to New.  This really should be fixed by default in all apps tbh.  Seeing old cached data in forms (both when viewing records, editing records and even new records) is just silly and annoying. InfoPath never had that issue.  Hopefully this gets fixed in an upcoming update so that we don't have to do this everytime we create an app.

I have a custom form and your suggestion worked for me. thx

Thank you so much!! That behavior wasn't annoying at all :0)

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (3,055)