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?