web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Add data to a list fro...
Power Apps
Unanswered

Add data to a list from multiple forms

(0) ShareShare
ReportReport
Posted on by 46

Hi

 

I've searching in many posts in the forum and couldn't get some clear answer about what I need.

 

I have a unique data source (List from Sharepoint) this list has 45 columns (Information about the user and about family), I created 2 forms, one to add the user information and the other to add the information about the family.

 

I just added the different fields related to every group (user, family) to each form, the form that gets the information about the user works right, but the form to save the information about family just works like an independent form and creates a new record only with the fields that has the form.

 

I want to save the users information and then go to the second form and add the information about the family to the same record(user). I found some information about Patch function but I'm not sure if this is the solution to my problem.

 

Don't know how to select the last record submitted in the form 1, trigger it to the form 2 add the information and save it or if it's possible to.

Thanks for the help.

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @sebastiandcarri 

    Please review my video on Splitting forms properly and then let me know if you have questions of if it does not address your scenario properly.

     

    I hope this is helpful for you.

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @sebastiandcarri,

    Based on the issue that you mentioned, do you want to submit 2 forms at one time?

    Could you please share a bit more about the scenairo?

    If you have created 2 forms, I think you just need to refer to the Form.Updates.

    In your first form screen, add a button to navigate to form2:

    Navigate(Form2)

    Set the submit button as below:

    Patch(TravelPlans,Defaults(TravelPlans),EditForm1.Updates,EditForm2.Updates)

    Note that 'TravelPlans' is my SP list name, please replace it with yours.

    Regards,

    Qi

  • sebastiandcarri Profile Picture
    46 on at

    Hi Randy, Thanks for your reply. I watched in your video a chain actions to populate a form from different screens and then submit it all at once.

    Even if this doesn't solve what I need it's very useful for future projects that I have, thanks. I was taking the hard path, my solution was to create a 2nd List in SharePoint and every form submit the required information to every list, I didn't want to have 2 list but it's the best way it worked.

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @sebastiandcarri 

    Yes, that is a hard route to take.  Definitely keep the method in the video on hand when you get around to setting it right.

    By the way, the previous response with changing the Submit to Patch is NOT recommended for a variety of reasons.  Definitely not a method to use or remember!  Although it will work, it completely discards all of the functionality of the EditForm, plus it will never work with attachments. 

     

  • sebastiandcarri Profile Picture
    46 on at

    Hi @v-qiaqi-msft 

    No, not at once. I wanted to submit a form to save information in some columns in my list and then with a 2nd form select the same record and save information for other columns, just like when you use VBA forms to add/modify information in a DB for a record selected. 

     

    I didn't want to have 2 list for the same project and allow the user to submit some information in form 1 and then later come back and submit information in form 2 but I wanted to save all in the same list(database). However I couldn't find a solution and I think Patch function is not what I need. 

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @sebastiandcarri,

    Sorry for the late reply.

    Do you want to submit a record for some certain columns and then edit it in another form?

    If so, I think my solution could make it work.

    I am not quite sure why you want to submit twice, one for user info and another for family info.

    In addition, I do not agree what @RandyHayes said that it will never work with attachments. Form.Updates could absolutely update the Attachment.

    If you want to edit the last submit record in the Form2, you could just set the Form2 Item as 

    Form1.LastSubmit

    If you have solved your problem, please mark your own reply as answer.

    Regards,

    Qi

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @v-qiaqi-msft 

    The ability to include the attachments control in a Patch is recent.  

    The point still remains, there is no need to complicate the app with a Patch when the form can SubmitForm for multiple forms together.  Things like LastSubmit, OnSucces, OnFailure, etc are all lost when you Patch.

     

    @sebastiandcarri 

    Can you describe more about your process?  If you are trying to create two forms for various stages of entry, there is no need to believe that you need two lists for it.

    I am focused on your statement - "some columns in my list and then with a 2nd form select the same record"

    What happens in between - the part in red??

    Are you stating that the user would enter information in one form and then immediate go to another form to edit/add more detail?  Or are you stating that a user would enter information into one form and then "at some other time" return to that record and edit/add more detail?

     

  • sebastiandcarri Profile Picture
    46 on at

    Hi Randy and @v-qiaqi-msft  thanks for taking time on this. 

    This is what happens exactly: "an user would enter information into one form and then "at some other time" return to that record and edit/add more detail".
    This is a detailed example about the workflow.

     

    The list in sharepoint has 25 columns. First 10 columns are personal information  (i.e: ID, Age, Names, Occupation, Education Level, etc), then the other 15 columns are family members information (ie, Names, Age, Occpation, Type of Relation, etc).

     

    I want to allow the user submits information for every "category" (Personal information, family information) in a separate way(two independent forms) but using an unique database. Like Randy says an user submits personal information and later "at some other time" the user return to submit family information, to achieve this once the user submits the personal information and want to submit the family information it's necessary in the second form (family information) , select the record from a key value(ID from personal information) and save the information for that ID in the corresponding columns(family information).

     

    Splitting all the list into various forms requires that the user submits all the information at the same time. I could achieve what I needed using two sharepoint lists, 1 to save the personal information from form 1 and the other one to save the family information from form 2, but if there's a way to make it with an unique list would be great.

     

    I've read in many forums that it's not possible to do this, to select a record from a list and save information in  columns using multiple independent forms.

     

    I've done this many times working with VBA forms and an unique DB because I just have to select the Key Value(ID) in the second form and save the information with reference to an specific column for a specific record.

     

    Thanks again for your help. 

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard