cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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
v-xida-msft
Community Support
Community Support

Hi @Anonymous,

 

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/td-p/51826

 

 

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.

View solution in original post

8 REPLIES 8
ssvk
Advocate II
Advocate II

are you unable to save the data to SP list?

Anonymous
Not applicable

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

 

 

v-xida-msft
Community Support
Community Support

Hi @Anonymous,

 

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/td-p/51826

 

 

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.

View solution in original post

Anonymous
Not applicable

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

 

Sue

Anonymous
Not applicable

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)

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

hi @


@v-xida-msft wrote:

Hi @Anonymous,

 

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/td-p/51826

 

 

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (39,125)