So I faced a bug yesterday, and after some testing I figured that it was a bug in the powerapps environment and not in my code. I would like some workaround suggestions.
I have an app that has multiple editforms and displayforms. The issue I am facing is that if I launch the app, and immediately go to view some record in a displayform e.g., DisplayForm1. Then I want to edit the record so I enter an EditForm1, in edit mode. The editform shows right values for the record I want to edit. Now when I change some value in it, and click on the button containing 'SubmitForm', the form does not update the values. It shows it has succeeded and also runs the 'OnSuccess' code of it. But neither does the DisplayForm1 show new values, nor does the backend excel table.
Now on the other hand, if after launching the app I open the EditForm1 in NewForm mode, and add a new record, the form somewhat gets "initialized" which was not happening before. So after submitting a new record in a session, now when I go in the edit mode and edit a record (not even the latest one, just any old record), everything works fine.
I have tried initializing the form in some other ways, by adding 'NewForm' to some button prior to going EditForm for it, but it doesn't work unless at least one new value was submitted in the session. And this is happening with all the forms in the app, so even if I get EditForm1 initialized, I will still be getting the same problem with EditForm2, unless I get it initialized like that separately.
Could this be related to app size? My app has become quite large, is that affecting the behaviour? Although I don't think it is, because the form does pick up right values. It just doesn't update them.
Hi @Anonymous ,
Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentined.
Please consider re-generate a new app based on your data source, then try it again, check if the issue is solved. Also please consider turn off the "Improved app rendering (final validation)" option within Advanced settings of App settings of your app, then re-load your app, check if the issue is solved.
In addiiton, please also consider use Patch function to submit your Edit forms data instead of SubmitForm function. Please set the OnSelect property of the "Submit" button to following formula:
If( EditForm1.Mode = FormMode.New && EditForm2.Mode = FormMode.New && EditForm3.Mode = FormMode.New && ..., Patch('YourDataSource', Defaults('YourDataSource'), EditForm1.Updates, EditForm2.Updates, EditForm3.Updates, ...), /* <-- Add new record */ Patch('YourDataSource', BroeswGallery1.Selected, EditForm1.Updates, EditForm2.Updates, EditForm3.Updates, ...) /* <-- Update existing record */ )
Note: I assume that you use Gallery to list all records from your data source in your app. And I assume that you use multiple Edit forms to submit data into your Excel table data source.
More details about Patch function, please check the following article:
Featuring samples like Return to the Workplace and Emergency Response Applications
We're excited to announce our first cross-community 'Can You Solve These?' challenge!
Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.
We are excited for the next Super User season.
Features releasing from October 2020 through March 2021