Some time ago I created an application with many forms related to SharePoint lists. It was fully functional and data began being entered into it. At some point, most of the forms stopped loading. They share a common default value for one of the controls, which is stored in a global variable, but so far this hasn't been a problem.
What could be the source of the problem and how to solve it?
Solved! Go to Solution.
I found a solution. Adding "Refresh (DataSource) ;; NewForm (Form)" to the "OnVisible" form causes the data to load correctly.
Do you set any of the values you use in OnStart? The behavior of variables set in OnStart has changed and values aren't guaranteed to be set when the app starts. That might be related to the problem.
No, I haven't used OnStart anywhere. However, I have a few variables assigned to OnSelect, OnSucces, and OnReset. Can they also cause problems?
No, only the behavior of OnStart changed. What is the DataSource and Item setting for the Forms where data isn't loading?
They use SharePoint lists as a data source. But as Item they have nothing.
For forms to work you need to have some designation in the item property of the form that identifies which record is bound to the form for editing. The only time you don't need an Item property is if the form is in New Mode. But that is only for creating new records. To edit existing records the form needs to be in Edit mode and the item property needs to identify the form being edited. This is normally done with something like GalleryName.Selected, which lets you edit the selected record in the gallery. Check the mode on the form and add something appropriate to the item property.
I don't think that's the source of the problem. The screen is constructed in such a way that the indicated forms are always in the mode of adding a new record, and on its right side there is a gallery of entered records. The application does not provide the option of editing records, only deleting them.
I found a solution. Adding "Refresh (DataSource) ;; NewForm (Form)" to the "OnVisible" form causes the data to load correctly.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
177 | |
52 | |
41 | |
36 | |
27 |
User | Count |
---|---|
243 | |
81 | |
71 | |
69 | |
66 |