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 / Patch 2 Sharepoint lists
Power Apps
Unanswered

Patch 2 Sharepoint lists

(0) ShareShare
ReportReport
Posted on by 115

Hi, 

I would like to duplicate the same data in 2 lists.

I am able to patch all items in 1st list.

How do i get the new ID from 1st and patch in second list?

First List

IDStaffDepartment
1ABCHR

 

Second List

primaryID( get from First List)ActivityDate
1Eating1/2/2022
Categories:
I have the same question (0)
  • rb Profile Picture
    835 Super User 2024 Season 1 on at

    Hi,

     

    Patch() returns the record created/updated, so you can use this to string together patches to related tables. Eg:

    With(
    	Patch(
    		SP_Table1,
    		Defaults(SP_Table1),
    		{Staff: "ABC", Department: "HR"}
    	) As ParentRecord,
     Patch(
     SP_RelatedTable2,
     Defaults(SP_RelatedTable2),
     {
     primaryID: ParentRecord.ID,
     Activity: "Eating",
     Date: Date(2022, 1, 2),
     }
     )
    )

     

    I hope you can adjust this to suit your needs, I have obviously hard-coded some values for demonstration.

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