cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aravial
Frequent Visitor

Forms that previously worked properly stopped loading in the application.

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.

 

Aravial_0-1644075491580.png

 

 

What could be the source of the problem and how to solve it?

1 ACCEPTED SOLUTION

Accepted Solutions
Aravial
Frequent Visitor

I found a solution. Adding "Refresh (DataSource) ;; NewForm (Form)" to the "OnVisible" form causes the data to load correctly.

View solution in original post

7 REPLIES 7
Pstork1
Dual Super User
Dual Super User

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Aravial
Frequent Visitor

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?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Aravial
Frequent Visitor

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Aravial
Frequent Visitor

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.

Aravial
Frequent Visitor

I found a solution. Adding "Refresh (DataSource) ;; NewForm (Form)" to the "OnVisible" form causes the data to load correctly.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,785)