cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Suep
Level 8

Save data to SharePoint

I created a PowerApp which is a survey with 7 screens total. Our customers are asked to complete this PA then save / submit the data entered to a SharePoint (2016) list created with a column for each field on the PA. There is no flow used and none of the date will be added, deleted, or modified -- just a simple save to SP list when clicking on a Button. (One row per each survey)  As simple as it sounds, it will not work Can anyone help me?

 

Thanks.

2 ACCEPTED SOLUTIONS

Accepted Solutions
ssvk
Level: Powered On

Re: Save data to SharePoint

Community Support Team
Community Support Team

Re: Save data to SharePoint

Hi @Suep,

 

Do you want to save multiple form data within different screens into one row of your SO list data source?

 

Based on the second screenshot that you provided, I think there is something wrong with the formula that you provided. The SubmitForm function could only submit one form data into the data source once time.

 

In addition, I don't think the SubmitForm function could achieve your needs. If you use SubmitForm function to submit each form data (Editform1, Editform2, Editform3,...Editform7) into your SP list data source, it would insert 7 rows into your SP list data source rather than one row (One row per SubmitForm function).

 

As an alternative solution, I think the Patch function could achieve your needs. I suppose that there is a "Next" button within each screen (except the last screen) of your app, you click this "Next"  button to navigate to next screen, is it true?

 

Within the last screen, set the OnSelect property of the "Submit" button to following formula:

Patch(
   'YourSPList',
    Defaults('YourSPList'),
    EditForm1.Updates,
EditForm2.Updates,
EditForm3.Updates,
EditForm4.Updates,
EditForm5.Updates,
EditForm6.Updates,
EditForm7.Updates )

Note: The 'YourSPList' represents the SP list data source within your app.

 

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

Please check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Submitting-multiple-forms-to-a-single-table/t...

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
8 REPLIES 8
ssvk
Level: Powered On

Re: Save data to SharePoint

are you unable to save the data to SP list?

Suep
Level 8

Re: Save data to SharePoint

I have double checked the SP list location on all of the 7 sheets so that should be correct. However, the folllowing error message appears when Submit is selected. The first attachment is the error message and the 2nd attachment is the function listed for OnSelect:

 

Please Help!

Sue

 

 

ssvk
Level: Powered On

Re: Save data to SharePoint

Community Support Team
Community Support Team

Re: Save data to SharePoint

Hi @Suep,

 

Do you want to save multiple form data within different screens into one row of your SO list data source?

 

Based on the second screenshot that you provided, I think there is something wrong with the formula that you provided. The SubmitForm function could only submit one form data into the data source once time.

 

In addition, I don't think the SubmitForm function could achieve your needs. If you use SubmitForm function to submit each form data (Editform1, Editform2, Editform3,...Editform7) into your SP list data source, it would insert 7 rows into your SP list data source rather than one row (One row per SubmitForm function).

 

As an alternative solution, I think the Patch function could achieve your needs. I suppose that there is a "Next" button within each screen (except the last screen) of your app, you click this "Next"  button to navigate to next screen, is it true?

 

Within the last screen, set the OnSelect property of the "Submit" button to following formula:

Patch(
   'YourSPList',
    Defaults('YourSPList'),
    EditForm1.Updates,
EditForm2.Updates,
EditForm3.Updates,
EditForm4.Updates,
EditForm5.Updates,
EditForm6.Updates,
EditForm7.Updates )

Note: The 'YourSPList' represents the SP list data source within your app.

 

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

Please check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Submitting-multiple-forms-to-a-single-table/t...

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Suep
Level 8

Re: Save data to SharePoint

Thanks Kris. I'll give it a try and let you know if it works.

 

Sue

Suep
Level 8

Re: Save data to SharePoint

Hi Kris,

 

Below is what was entered for Save (button1) on page 7. There is a "next page" button and "previous page" button on each screen which work correctly. I think I created the syntax exactly as you suggested but it does not work. The error is listed as an attachment below. What is wrong? I have been working on this so long, don't think I could identify my own name at this point. Any help would be appreciated. All works great on this PowerApp except for this last step.

 

OnSelect

 

Patch('Review for HomeBuyers_1',Defaults('Review for HomeBuyers_1'),EditForm1.Updates.AnnualIncume.Updates,EditForm3.Updates,EditForm4.Updates,EditForm5.Updates,EditForm6.Updates,EditForm7.Updates)

Flow Staff Audrie-MSFT
Flow Staff

Re: Save data to SharePoint

Thanks for connecting with me via Skype. I went ahead and marked @v-xida-msft as the solution. The change we made was just to the list name. 

 

Let us know if you need additional assistance,

Audrie

PytByt
Level: Powered On

Re: Save data to SharePoint

hi @


@v-xida-msft wrote:

Hi @Suep,

 

Do you want to save multiple form data within different screens into one row of your SO list data source?

 

Based on the second screenshot that you provided, I think there is something wrong with the formula that you provided. The SubmitForm function could only submit one form data into the data source once time.

 

In addition, I don't think the SubmitForm function could achieve your needs. If you use SubmitForm function to submit each form data (Editform1, Editform2, Editform3,...Editform7) into your SP list data source, it would insert 7 rows into your SP list data source rather than one row (One row per SubmitForm function).

 

As an alternative solution, I think the Patch function could achieve your needs. I suppose that there is a "Next" button within each screen (except the last screen) of your app, you click this "Next"  button to navigate to next screen, is it true?

 

Within the last screen, set the OnSelect property of the "Submit" button to following formula:

Patch(
   'YourSPList',
    Defaults('YourSPList'),
    EditForm1.Updates,
EditForm2.Updates,
EditForm3.Updates,
EditForm4.Updates,
EditForm5.Updates,
EditForm6.Updates,
EditForm7.Updates )

Note: The 'YourSPList' represents the SP list data source within your app.

 

More details about the Patch function in PowerApps, please check the following article:

Patch function

 

Please check and see if the following thread would help in your scenario:

https://powerusers.microsoft.com/t5/General-Discussion/Submitting-multiple-forms-to-a-single-table/t...

 

 

Best regards,

Kris


hi @v-xida-msft i have a question regarding form submit.

 

how exactly i can submit an edit result to my SP list. 

 

for example, i already have a record in my SP list, and then i use edit form in powerapps with main purpose to edit that exact record (ie. birthdate change, or typo name changes, etc).

 

please help, i realy need to know.

 

thank you.

 

regards,

pytbyt

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 215 members 2,410 guests
Please welcome our newest community members: