I have a form with a Sharepoint list as the datasource. I can open the form in edit mode and I can edit the data. I then save it using SubmitForm(Formname);Refresh(datasource). Should I be using patch instead? Submitform is a lot simpler.
I can check my sharepoint list and the data is updated correctly. My problem is that the form actually refreshes back to what the original data was.
If I close the powerapps tool and re-open it then the data displays with the edited correct data. If I refresh the sharepoint page it is embedded in it will show the correct data.
Can anyone tell me why the Refresh(datasource) is not updating it real time and I need to shut it down and re-open it?
SubmitForm is indeed easier, but as soon as you need to do something more complex (eg break your form over multiple screens), you are better off moving to Patch.
As for your Refresh issue, I am not 100% sure. I wonder if the commands are running synchronously and therefore Refresh is happening prior to the commit to SharePoint? (I am happy to stand corrected by anyone else as I have not tested the theory)
I decided to add a "Refresh" button which is only the Refresh(datasource) OnSelect. When I press the button the issue is the same - nothing updates to match the backend Sharepoint List.
Even waiting a few hours it still did not update unless I closed PowerApps and opened again. I also tried going to View -> Data sources and refreshing manually - same problem.
I am curious... If you add a gallery and set its items property to the data source, does the refresh button work then?
Interested to see if its the datasource or the editform
so I added a gallery in next to the form and made updates to the form data. I hit Save which submits form and refreshes.
The gallery updates nicely - the form reverts to original data. My next step I think will be to remove the form and build the "form" manually and use a Patch command to update the Sharepoint list.
I really wish Powerapps was not so "immature" - I have been playing for a couple of weeks now and I am finding many limitations that are in "Planning" yet no way to know when Powerapps will truly be ready to be a Power User tool.
I feel your frustration, but I can assure you it has a lot going for it. For example consider this...
But in relation to your issue, I use the patch command with custom pages because of the additional control it affords. In fact you can see that in the example app referenced in the above video...
My situation was kind of different, on the OnSuccess of the form i was using
but when i clicked to view the field again, the view form was not updated to current value, but the edit form was.
I was able to solve this by adding
to the OnView of the SharePointIntegration before the ViewForm() command;
Moreover,the Refresh button worked for me.
I had a hard time to clear data from a SharePoint form before opening form on another item from a SharePoint list.
This saved my day.
Check out new user group experience and if you are a leader please create your group
Next call is happening on April 21st at 8a PST.
May the fourth be with you, join us online!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.