I’m running into an issue where my Edit Details form is not refreshing with new data once the form is saved. It is saving the data to my SharePoint list and if I navigate away from the page and back again the form shows the updated data. Here’s the background:
- On my gallery OnSelect property, I set a variable (varRecord) to ThisItem like this:
Set(varRecord,ThisItem); Navigate('Request Details Screen', ScreenTransition.None)
- On the Request Details screen I have an Edit form with the Item property set to varRecord
- On the Request Details screen, I have an Edit button that sets a variable called v_EditOn to true to change the form mode to edit.
Set(v_EditOn, true)
- The Save button OnSelect property is set to:
Patch('Spend Request',{ID:varRecord.ID},frm_ReqDetails.Updates); Set(v_EditOn, false); Refresh('Spend Request')
- The form’s OnSuccess property is set to: Refresh('Spend Request').
I also tried adding ResetForm(frm_ReqDetails) in the form OnSuccess and on the Save button…but no luck there.
I’ve read several posts where others were having the same issue, but I can’t seem to resolve this. I saw the suggestion to use Gallery.Selected instead of using the variable but I don’t think that’s an option for me. The reason I’m using varRecord is because I’m also using deep-links and accessing the detail screen from multiple different galleries.
Does anyone have any other suggestions for how to fix this?