I started to have a strange problem. I have a "Save Draft" functionality in my app and it workded as expected until today.
If the Item is new, I patch the Item to SharePoint with the following code:
UpdateContext({ AccidentRecord: Patch( AccidentReporting, Defaults(AccidentReporting), formaccidentinfo.Updates, formpersonnellInfo.Updates, formTypeOfIncident.Updates, formIncident.Updates, formCause.Updates, formRCA.Updates, formCorrectiveAction.Updates, { Status: { '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Value: "Draft" } }, {EmployeeWOEmail: inputTempEmployee.Text} ) })
The patch works, but for some reason, the screen is now reset and all field are blank. Again, this worked as a charm 2 days ago.
Any help on this would be greatly appreciated!
Thank you,
Leon.
Solved! Go to Solution.
Hi Leon, I don't know why the behavior of your screen changed. Am I correct in thinking that you want to see the results of your patch? If so, you could put a View form on your screen and set its DataSource to AccidentReporting and the Item property to First(Sort(AccidentReporting,ID,Descending)).
Hi @Anonymous,
What did the screen look like two days ago?
Thanks for replying.
Few days ago, the screen would just retain the values that user would enter before saving.
Thank you,
Leon.
Hi Leon, I don't know why the behavior of your screen changed. Am I correct in thinking that you want to see the results of your patch? If so, you could put a View form on your screen and set its DataSource to AccidentReporting and the Item property to First(Sort(AccidentReporting,ID,Descending)).
did you manage to fix it? I am experiencing the same when there's multiple edit forms, I think patch is resetting the forms for some reason.
Yes, I resolved it.
Long story short, I set the Default Mode to "formmode.edit" and changed the "item" property to
If(
(resumeDraft || copyNDAitem),
myRequestsGallery.Selected
)
This way, if this is a resumtion of draft it will re-reload items from the selected item.
Hope this helps!
Leon.
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
205 | |
183 | |
71 | |
37 | |
33 |
User | Count |
---|---|
344 | |
274 | |
118 | |
76 | |
58 |