Hi,
I am using PowerApp to create forms used to create/modify items in a Sharepoint Online list. However, I have an issue: from time to time (1 time on 5 on average), the behavior is different than the one expected and I loose all the data I entered in the form.
There is nothing special in what I am doing. I just call the "RequestHide()" function in the "OnSuccess" event. My issue is that the behavior changes without any reason. Here are the two cases:
NORMAL CASE
I click edit on one item of the list ==> The form appears populated with the list content
I click "Save" (standard button) ==> sometimes moving "balls" appear saying that this is ongoing, but most of the time, this is quite instantaneous: the data is saved and the form is closed.
ABNORMAL CASE
I do exactly the same than in normal case, but when I clic Save, the form doesn't close and reloads instead the content form the item of the list, replacing the changes I just made. The form doesn't close.
This looks random: sometimes it saves, sometimes it looses the modifications (by reloading the initial data) and keep the form opened. I couldn't find any relationship with the network status, the browser used or whatever.
How can I solve that ? Is there any way to go a bit deeper in the debug to understand why some times the form doesn't save the data and reload the old ones instead ?
Now, to be complete, I had to add some code in the advanced tab of the form to have the data loaded in the form when it appears... this may be the source of the problem, but if I don't put this, the form never loads any data (stucked with the message "Getting your data...". Here is the code (in Advanced/Data/Item field):
If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),First([@PMO_reporting]),SharePointIntegration.Selected)
I think that this code is called when the form is launched and that it populates the data (which was the goal). But I have the impression that it is sometimes called for some reason when I try to save the form, and the result is that all the form data is replaced.
Does somebody has an idea how to solve this ?
Best regards.