cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mjshull
New Member

PowerApps SharePoint List Form with Multiple Pages Overwrites Data

We have a PowerApps form that drops data into a SharePoint List. The form has four pages to help break up the data entry. This form has a patch function to save records from all four pages and it seems to work fine expect for this one occasion: 

  • When the form is opened and only changes are made to page one, which is our main page, and subsequent pages are not viewed, those subsequent pages are occasionally being overwritten with data from another record. 

The issue seems to have something to do with cache? If you navigate to the second screen and watch the data update from the previous record, then save without going to the third and forth pages, only the first two pages will populate with the correct data and the last two pages will duplicate the data from the previous record. 

 

Is there a function that I can add that would refresh all pages OnView in order to prevent having to scroll through all of the pages to ensure that they have updated? 

 

This form can't be shared though I am happy to share any code that may be helpful with diagnosing our issue. 

1 ACCEPTED SOLUTION

Accepted Solutions

These forms don’t have that sort of logic built in as they are all a dynamic set of fields that get updated differently based on what is needed for any specific record. The only required fields are the title and division. All other fields are complete as the information is gathered and that varies depending on the initiative. 
 
I suppose one option could be to add edit and save buttons for each page so that only the data from a specific form/page is changed, then disable the SharePointIntegration buttons. Or return the SP form back to stock and create a gallery outside of SP to view and edit initiatives as described above. Thoughts? There must be a way to do this within SP?

View solution in original post

4 REPLIES 4
RandyHayes
Super User
Super User

@mjshull 

I would advise splitting your form properly instead of using the Patch function on it.  You lose the functionality of the form and the features (especially on the error handling) of the form.

 

Your primary issue is most likely coming from the patch statement and the fields you have on the forms.  Patch works from left to right.  If you have one column specified in a left record, then if it is specified in a right record, it will overwrite the left value.  So I'd be looking to see what fields you have duplicated across the forms.

 

Splitting a form is easy to do and can be done without breaking the form.  Take a look at this video for more details on how to do it properly.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

HI Randy. Thanks for your reply. We've tried a similar method as you outline in your video with having a final record at the end to submit and we might consider bringing this option back in. However, it's not ideal. I'll provide some screenshots below showing what we are trying to do.

 

Our form is currently being split across four pages as described in the video and no fields are being duplicated across the pages. We are using the SharePointIntegration buttons to save, view and edit the form. I've tried stringing multiple SubmitForm features together and, as you know, that doesn't work. 

 

Below we have a SharePoint List (left) and our PowerApps form (right). This form has four sections: Home, Progress, People, and Results. We are hoping to create an environment that allows for the user to navigate to the page that requires updates without having to navigate to other pages. For an example, if a progress update needs to be entered, which is the most common field to be updated, the user opens the form > hits the notebook icon > Updates the message log > Saves.  

 

Thoughts on how we might accomplish this without having a summary page of data to submit? 

 

 

Capture.PNGCapture.3PNG.PNGCapture.2PNG.PNGCapture.1PNG.PNG 

RandyHayes
Super User
Super User

@mjshull 

Well, the way the forms are split, they all feed to a master form.  That is the form that is used to Submit and also for all the functionality of the form.

The nice things about the forms is the Valid property.  I could see this as being part of the solution you need.

So, if, for example, the first form is complete, then the Form1.Valid would be true.  If the second form is not complete, then the .Valid would be false.  From that logic, you could easily display the appropriate form to be completed.

The individual forms would work independently, yet they all feed their results into the primary main form.  The individual forms would never be submitted - only the primary form.

 

But what you are describing is more of a "navigation" (or visibility) to a specific form based on values of the underlying record.  You are basically stating that you want it to go to the notebook form when entering a record to view.  If that is the case, then that is really more about the mechanism you have for displaying various parts of the form now (and even with the proper way).  So, there seems to be other logic for what is displayed and not just about what stage the entry is in.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

These forms don’t have that sort of logic built in as they are all a dynamic set of fields that get updated differently based on what is needed for any specific record. The only required fields are the title and division. All other fields are complete as the information is gathered and that varies depending on the initiative. 
 
I suppose one option could be to add edit and save buttons for each page so that only the data from a specific form/page is changed, then disable the SharePointIntegration buttons. Or return the SP form back to stock and create a gallery outside of SP to view and edit initiatives as described above. Thoughts? There must be a way to do this within SP?

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (1,662)