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

Submit Multiple Forms into One SharePoint List Entry

I'm working on a new mobile phone PowerApp that takes one large sharepoint list and divides the questions across multiple screens. This has resulted in multiple Edit Forms that I am looking to have all of them submit back to just one combined entry in the SharePoint list. Typically, when I do this, I just have the first Edit Form  have hidden datacards that match the datacardvalues of the other Edit Forms. Due to the large number of questions/columns, I was wondering if this is the best way to do this, or if there is an easier way?

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Submit Multiple Forms into One SharePoint List Entry

Hey @ngreen 

 

A better way to do this would be to use the Updates attributes of the form control on the final page as:
 
Patch(DataSourceName, Defaults(DataSourceName),Form1.Updates, Form2.Updates,Form3.Updates)
 
Hope this helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Submit Multiple Forms into One SharePoint List Entry

Hey @ngreen 

 

A better way to do this would be to use the Updates attributes of the form control on the final page as:
 
Patch(DataSourceName, Defaults(DataSourceName),Form1.Updates, Form2.Updates,Form3.Updates)
 
Hope this helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Super User
Super User

Re: Submit Multiple Forms into One SharePoint List Entry

@ngreen 

You could PATCH the records as the user advances through each screen instead of using the SUBMIT function. 

 

My assumption is you will be distributing this survey to members of your organization through email.  When the user starts the survey you'll want to capture their email address.  This unique identifier will be used to create the blank survey record.  Put this code in the OnSelect property of your survey's start button.

 

Patch(
	your_datasource_name,
	Defaults(your_datasource_name),
	{email:User().Email}
);

 

Then create your first screen containing survey questions.  When you are done, put this code in the OnSelect property of the next screen button.  Of course, you'll have to change the question numbers to match the column names you want to update.

 

Patch(
	your_datasource_name,
	LookUp(your_datasource_name,email=User().Email),
	{question1:true,question2,false,question3:true}
)

 

Repeat this method on as many screens as you require.

 

You might be wondering why I am suggesting to create a new record right when the survey is started rather than wait until the end of the process.  This is because I prefer to save the user's progress on each page.  When a user is filling out a long form they may want to take a break or they may get interrupted so its a nice feature to have Smiley Very Happy

 

---
Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

ngreen
Level: Powered On

Re: Submit Multiple Forms into One SharePoint List Entry

@yashag2255 

 

This worked! Thank you! 

Highlighted
kharina
Level: Powered On

Re: Submit Multiple Forms into One SharePoint List Entry

Hi @yashag2255 , 

 

This helped me as well. KUDOS!!! Thank you very much!!!! 🙂

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (7,670)