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 / Help- save data to 2 s...
Power Apps
Answered

Help- save data to 2 sharepoint lists for multiple controls

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi Community,

 

I have created a screen form in powerapps where I have added multiple controls. After passing parameter -ID from first screen, I retrieve ID in the second screen. This works fine. Now I have to save the other submitted data against this ID in multiple lists. I have repeater control in gallery with fields as below- multiline, date and combobox (single select)containing list of users. 

This is repeated with a plus icon and stored in collection. This has to be updated in list A.

 

VaibhavKaulkar_0-1651071528261.png

Along with this I have single select and multiselect Check boxes that I need to save to list B. Do i need to use patch to add records in both lists?

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, I have managed to update the ListA with values. However, list B is not getting updated with lookup. This needs to be updated with Lookup to list A. what could be wrong here? Also is it possible to bind these values back to controls when the items are updated.

     

    Set(
     AllActionsPlanString,
     Concat(
     galActionPlan.AllItems,
     Concatenate(
     txtTargetVal.Text,
     "; ",
     txtWhatTodo.Text,
     "; ",
     dtWhenReady.SelectedDate,
     "; ",
     comboResponsible.Selected.DisplayName,
     "; ", 
     " | "
     )
     )
    );
    
    If(
     IsBlank(lookupActionRecord),
    Patch(
     'ListB',
     Defaults('ListB'),
     {
     Title: ProjectID,
     RepeatedSection: AllActionsPlanString,
     SLARiskAssessments:{
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id:ProjectID,
     Value:ProjectID
     }
     }
    ),
    !IsBlank(lookupActionRecord),
    Patch(
     'ListB',
     First(Filter('ListB', Title = Text(ProjectID))), 
     { 
     RepeatedSection: AllActionsPlanString 
     } 
    )
    );

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Dear Community, I am now patching (creating new record) in List. It correctly creates all items except when people picker is added which when added updates only the last record instead of all records in the gallery.

    ForAll(galActionPlan.AllItems,
    Patch
    (
     'ListB',
     Defaults('ListB'),
     {
     Title: ProjectID,
     //RepeatedSection: AllActionsPlanString,
     LookUp:{
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id:varID,
     Value:varID
     },
     Target:ThisRecord.txtTargetVal.Text,
     ToDo:ThisRecord.txtWhatTodo.Text,
     Ready:ThisRecord.dtWhenReady.SelectedDate
     
     /*RiskResponsible:
     {
     Claims: "i:0#.f|membership|" & LookUp( Office365Users.SearchUserV2().value, DisplayName=comboResponsible.Selected.DisplayName).UserPrincipalName,
     Department:"",
     DisplayName: "",
     Email: "",
     JobTitle:"",
     Picture:""
     }*/ 
    
     } 
    )
    );

     

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi, this is achived with datatable and form control instead of gallery. 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,074

#2
Valantis Profile Picture

Valantis 639

#3
11manish Profile Picture

11manish 606

Last 30 days Overall leaderboard