Re: Error repeat sending a form: data source may be invalid
@schwibach
Yep, so for clarity. I am not referring to others updating other items in the list. That will be design specific.
If there is a chance that someone else is updating the exact same item in the list, then there are some additional steps that you need to take. One is that you will need to utilize the OnFailure of the form to catch the error. Then you will need to determine if the error is due to a record conflict. If there is, then you can actually revert JUST that record from the datasource and then attempt to resubmit.
If there is a chance that someone will be updating other records other than the one that is being edited, then if the user needs to eventually access that record, then you'll want to refresh the datasource.
NOW...keep in mind, all of what I talk about above is in the context of an individual session. If the user exits the app and comes back in, the data will be as current as the point at which they start the app again. So, you need not concern yourself with data changing by other sources and the user not being in the app - it will be up-to-date when they return again.
As for the moment in time that a user submits a form successfully and then returns immediately back to that record to edit in the form, there is no need for a refresh.
Taking from the first point above, if the user tries to submit the form and someone else has changed it, it will fail and that is where catching it in the OnFailure will be your recourse. You can get the Error information at that point, and if need be, you can Revert that record and submit again. The links in that sentence will take you to the docs that have more details. In fact, in the Revert link, there is a pretty good example of how to catch the error and revert. Although in that example they use a Patch, the concept would be the same with the Form, except you would use the current form record, then update your variable that you are using in the Item property of the form Patched with the Updates of the Form trying to be submitted - this will Revert to the new record values, then patch with the values that were entered.
I hope I am hitting the nail on the head for you and not off on some different tangent.