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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patching 3 forms with ...
Power Apps
Unanswered

Patching 3 forms with same data source to SharePoint list item along with some secondary data source fields

(0) ShareShare
ReportReport
Posted on by 102

I have a SharePoint-integrated Power App where I have separated the fields from a SharePoint list into 3 forms across the 3 screens. I also have 2 fields that draw from secondary data sources that need to be patched to the record. I am struggling how to combine both of these scenarios to result in submission of one SharePoint list item.

 

If I use the formula below on Submit button, I get all values into list except for my two separate data sources. This makes sense because I know I need to identify those separately.

Patch(PATestQTP,
Defaults(PATestQTP),
SharePointForm1.Updates,FORMassign.Updates,FORMinterview.Updates);
RequestHide();
Launch("https://XXXX.aspx")

 

Once I add the additional patches from the secondary data sources to the formula like this, the form throws an error that it needs additional fields required fields for the Patch. 

Patch(
PATestQTP,
Defaults(PATestQTP),
{
'Trainer Name':TN_Text.Text,
'Training Partner Name':TPN_Text.Text
});
SharePointForm1.Updates;FORMassign.Updates;FORMinterview.Updates;
RequestHide();Launch("https://XXXX.aspx")

 

If I then add those like this, I ONLY get those values patched to the list and NONE of the default fields:

Patch(
PATestQTP,
Defaults(PATestQTP),
{
'Email ID':DataCardValue3.Text,
'Products Qualified':DataCardValue70.Selected,
'Trainer Name':TN_Text.Text,
'Training Partner Name':TPN_Text.Text
});
SharePointForm1.Updates;FORMassign.Updates;FORMinterview.Updates;
RequestHide();Launch("https://XXXX.aspx")

 

**How should I formulate this to get both the form defaults from 3 forms and the 2 secondary data source fields in one list item?

Categories:
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @acoliva 

     

    To submit multiple forms and patch additional fields from secondary data sources to a SharePoint list, you need to combine all the updates in one Patch function. You can use the comma (,) to separate the different updates, and use the semicolon (;) to end the Patch function.

     

    For example, you can try this formula on your Submit button:

    Patch(
     PATestQTP, 
     Defaults(PATestQTP), 
     SharePointForm1.Updates, 
     FORMassign.Updates, 
     FORMinterview.Updates,{ 
     'Trainer Name':TN_Text.Text, 
     'Training Partner Name':TPN_Text.Text 
     }
    ); 
    RequestHide(); 
    Launch(“https://XXXX.aspx”)
    

     

    This formula will patch all the fields from the three forms and the two additional fields to the SharePoint list item. You don’t need to specify the default fields like ‘Email ID’ and ‘Products Qualified’ in the Patch function, as they are already included in the SharePointForm1.Updates.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • acoliva Profile Picture
    102 on at

    Thanks so much for responding. It's good to know that what I originally attempted should work but for some reason it does not. When I apply the exact formula above, a new item is submitted to the list but only with the first 5 highlighted fields and nothing else from the 1st screen or 2 subsequent screens/forms...

    acoliva_3-1696690081804.png

     

     

    I also get this network/runtime error:

    acoliva_0-1696689821163.png

     

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @acoliva 

     

    Another possible solution is to use the Collect function to create a collection of the data from the three forms and the two text inputs, and then use the ForAll function to loop through the collection and patch each record to the SharePoint list. Here is an example of how you can do it:

     

    // Create a collection with the data from the forms and inputs 
    Collect( 
     colData, 
     { 
     FullName: SharePointForm1.FullName.Text, // adjust to DataCardValue controls
     EmployeeNumber: SharePointForm1.EmployeeNumber.Text, 
     HireDate: SharePointForm1.HireDate.SelectedDate, 
     Active: SharePointForm1.Active.Value 
     }, 
     { 
     FullName: FORMassign.FullName.Text, 
     EmployeeNumber: FORMassign.EmployeeNumber.Text, 
     HireDate: FORMassign.HireDate.SelectedDate, 
     Active: FORMassign.Active.Value 
     }, 
     { 
     FullName: FORMinterview.FullName.Text, 
     EmployeeNumber: FORMinterview.EmployeeNumber.Text, 
     HireDate: FORMinterview.HireDate.SelectedDate, 
     Active: FORMinterview.Active.Value 
     }, 
     { 
     TrainerName: TN_Text.Text, 
     TrainingPartnerName: TPN_Text.Text 
     }
    );
    
    // Loop through the collection and patch each record to the list 
    ForAll( 
     colData, 
     Patch( 
     PATestQTP, 
     Defaults(PATestQTP), 
     { 
     FullName: colData.FullName, 
     EmployeeNumber: colData.EmployeeNumber, 
     HireDate: colData.HireDate, 
     Active: colData.Active, 
     TrainerName: colData.TrainerName, 
     TrainingPartnerName: colData.TrainingPartnerName 
     }
     ) 
    );
    
    // Clear the collection and navigate to another screen 
    Clear(colData); 
    RequestHide(); 
    Launch("")

     

    This formula means, "Create a collection with the data from the three forms and the two text inputs, then patch each record in the collection to PATestQTP, then clear the collection and hide the request and launch the URL.".

    Also adjust the code to your needs if there is a error.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

     

  • acoliva Profile Picture
    102 on at

    I'm having trouble understanding the efficiency of this solution because I have 40+ fields that need to patch to the list so why wouldn't I just name all the fields in the patch in the first place rather than first name them in a collection and then name the collected names in a patch?

    I'm desperate for a solution, however, so I have attempted this but I don't know how you are using the syntax for the patched collection data: Am I simply restating the field name after colData.  ? My patch formula doesn't recognize that. 

    FullName: colData.FullName, 
     EmployeeNumber: colData.EmployeeNumber, 
     HireDate: colData.HireDate, 

      Can you also shed some clarity on why the first method may not be working? i was hoping to implement something like that for many InfoPath--> PowerApps conversions in the future or is creating multiple screens to span one form not best practice?

    Thanks again for your time and patience.

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    I mentioned in my second post it could be another possible solution. 

     

    Let me shed some light on your first initial code. First of all Im sorry to hear that the formula is not working as expected.

     

    There could be several reasons why some fields are not being submitted to the SharePoint list.

    Here are some possible causes and solutions:

    • The names of the fields in your forms do not match the names of the columns in your SharePoint list. Make sure that the DataField property of each data card in your forms matches the name of the corresponding column in your SharePoint list. For example, if your SharePoint list has a column called ‘Email ID’, then the data card that contains this field should have DataField set to ‘Email ID’.

     

    • The data types of the fields in your forms do not match the data types of the columns in your SharePoint list. Make sure that the data types of each data card in your forms match the data types of the corresponding columns in your SharePoint list. For example, if your SharePoint list has a column of type Choice, then the data card that contains this field should have a control of type Drop down or Radio.

     

    • The values of the fields in your forms are not valid for the columns in your SharePoint list. Make sure that the values of each data card in your forms are valid for the columns in your SharePoint list. For example, if your SharePoint list has a column of type Date and time, then the data card that contains this field should have a control of type Date picker or Text input with a valid date format.

     

    • The Patch function is not able to submit all of the fields at once due to a limitation or an error. You can try to split the Patch function into multiple calls, one for each form and one for the additional fields. For example, you can use something like this:

     

    Patch(PATestQTP, Defaults(PATestQTP), SharePointForm1.Updates); 
    Patch(Last(PATestQTP), FORMassign.Updates); 
    Patch(Last(PATestQTP), FORMinterview.Updates); 
    Patch(Last(PATestQTP), {'Trainer Name': TN_Text.Text, 'Training Partner Name': TPN_Text.Text});​

     

    This will create a new record with the values from SharePointForm1, then update it with the values from FORMassign, then update it again with the values from FORMinterview, and finally update it once more with the values from the additional fields.

     

    I hope these suggestions help you troubleshoot and fix the issue. 

  • acoliva Profile Picture
    102 on at

    Ultimately, I had to rework the solution to have all fields in one screen/one form. I would have preferred to divide them up with navigation buttons but nothing seemed to work correctly with the Patch formulas. Perhaps I will revisit the suggestions on a simpler test form in the future and see I can get the Updates logic to work.

    Thanks.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard