cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kolbackx
Level: Powered On

Update single list item with multiple screens

Hi! I have a SharePointlist and a modified form with two screens. Half the fields are on screen1 and the rest on screen2 and when I save or update I create a single list item out of both screens using Patch. This works just fine.

Patch(
  mySharePointList;
  First(
    Filter(
      mySharePointList;
      ID = SharePointIntegration.SelectedListItemID
    )
  );
  SharePointForm1.Updates;
  SharePointForm2.Updates
)

Problem is when I edit an list item, save it, and then edit another list item it remembers the first list item values in screen2 unless I go into that form (when navigate to a screen all fields will update somehow according to the selected value).

 

Is there a way to update all screens with the selected item values when edit without visiting them? I am using the built in save button in SharePoint, its not a step by step guide so I want to be able to save without navigate through all screens.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Update single list item with multiple screens

@kolbackx 

Hi there.   Is all of your data stored in the same table?  If yes, there is no need to create multiple forms.  You can use a single screen and show/hide datacards when the user clicks a button to goto the next section.  It will appear like there are multiple screens but there aren't.  An advantage of doing things this way is your only have to submit the form once with the SharePoint SAVE button and you do not have to use PATCH at all.

 

Put this code in the OnVisible property of your screen

Set(currentPage,1)

 

Then for every datacard you want showing on Page 1 you must put this code in the visible property.  For any datacards showing on other screens use the appropriate page number

currentPage=1

 

Create a button to browse to the next page with the following properties.  We will say for this example there are 3 screens.

Text: "Next Page"
OnSelect: Set(currentPage,Min(currentPage+1,2)
Visible: currentPage<>2

 

Create another button to browse to the previous page with the following properties.

Text: "Previous Page"
OnSelect: Set(currentPage,Max(currentPage-1,1)
Visible: currentPage<>1

 

Now click the SAVE button to submit the form.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Update single list item with multiple screens

@kolbackx 

Hi there.   Is all of your data stored in the same table?  If yes, there is no need to create multiple forms.  You can use a single screen and show/hide datacards when the user clicks a button to goto the next section.  It will appear like there are multiple screens but there aren't.  An advantage of doing things this way is your only have to submit the form once with the SharePoint SAVE button and you do not have to use PATCH at all.

 

Put this code in the OnVisible property of your screen

Set(currentPage,1)

 

Then for every datacard you want showing on Page 1 you must put this code in the visible property.  For any datacards showing on other screens use the appropriate page number

currentPage=1

 

Create a button to browse to the next page with the following properties.  We will say for this example there are 3 screens.

Text: "Next Page"
OnSelect: Set(currentPage,Min(currentPage+1,2)
Visible: currentPage<>2

 

Create another button to browse to the previous page with the following properties.

Text: "Previous Page"
OnSelect: Set(currentPage,Max(currentPage-1,1)
Visible: currentPage<>1

 

Now click the SAVE button to submit the form.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

kolbackx
Level: Powered On

Re: Update single list item with multiple screens

Thanks for reply, I think that will do! The reason why I would like to use multiple screens is mainly because I have lot's of fields (about 100) and it's a bit tricky to edit/maintain all fields in a single form. Using multiple screens gives me a better overview when editing. So I'm still interesting if it's possible... 🙂

Super User
Super User

Re: Update single list item with multiple screens

@kolbackx 

Using multiple screens doesn't make sense to me here.  If all the form data is from a single datasource you should create "pagination" on a single screen like the technique I showed.  Sorry, I do not have any advice on using PATCH + multiple screens for the same datasource.  In my humble opinion its just not the way to go.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

kolbackx
Level: Powered On

Re: Update single list item with multiple screens

True, true, I reevaluate. 🙂 👍

Super User
Super User

Re: Update single list item with multiple screens

@kolbackx 

Best of luck with building your app.  Make sure to come back to the forum if you have questions.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,468)