Hello, new Powerapps user here trying to build my first app, it seems perfect for our uses but I can't get past this one issue.
I have a form I'm building that will have a lot of data cards. My users are uncomfortable with the idea of only clicking "save" at the end after spending over an hour filling out the form with a client. I have done a lot of searching and can't find any solution to my issue.
My data comes from the database partially filled out, and then we will use this form to update anything that is entered incorrectly, and add a lot of new information.
I have a save button set to : UpdateContext({FormDisabled: true}); SubmitForm(Form1);UpdateContext({FormDisabled: false})
this works, but when the form is enabled again, all of the fields are reset to the information they contained when the page was first opened from the gallery. The database is updated correctly, but seeing all of that information disappear will terrify the users. Clicking back, waiting a few seconds, and then selecting the item again will present the correct data.
I have tried running patch inside of a textbox on change, so that it would save as they go. my code works, but again, once the patch is complete, the textbox displays the original content.
patch code: Patch('[dbo].[Opportunity]',First(Filter('[dbo].[Opportunity]',AccountId=displayItem.AccountId)),{Convert_Street__c:Convert_Street__c})
I even tried having the save button incorporate a Back command, and then a Navigate command back to the current item, but that doesn't work. you can see the blue dots doing their work across the top. if the navigate command fires before powerapps refreshes the dataset, it gets the old set of data.
help!
I am connected via the "cloud services" option to an on-premises SQL server.
I am ok with having the "Save" command display a spinning wheel or and waiting until the DB refresh is complete, if that's possible.
I was thinking maybe when the patch runs, on each textbox, I could patch the data to a variable in memory, then patch to the DB, and then pull the data back to the textbox from the variable. But I can't figure out how to do that.
I'm also ok with Save running on a timer / "Autosave" and just having it quietly save the data in the background without affecting what the user sees on screen. This would be ideal. I could set the SubmitForm to run on a timer, but again, the screen would refresh and show the user the original set of data.

Report
All responses (
Answers (