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 overwriting inst...
Power Apps
Answered

Patch overwriting instead of coping

(0) ShareShare
ReportReport
Posted on by 240

Hello,

 

I have a need to copy number of records from a child table and with reference to main table (one to many). The records that need to get copied to child table are getting overwritten (update). I need to keep new rows and create a new row based on the original record(s)

(Using default(datasource) gives me: "Dataverse network error when using patch function the specified column is generated by the server and cannot be specified."

below is the code that incorrectly overwrites existing records and the line that is responsible is 'TPS UID': NewCloneRecord.TPS,:

 

ForAll(
TeamMemebersRecord As Stuff,
Patch(
'TPS Team Members',
// Defaults('TPS Team Members'),
Stuff,
{
ApproverEmail: Stuff.ApproverEmail,
'Member Status': "Active",
Email: Stuff.Email,
'TPS UID': NewCloneRecord.TPS,
'Training Status': "Yes"
}
)
);

Categories:
  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @nemanjasovic011 - assuming the relationship direction is one-to-many from the Parent (one) to the Child (many), you should be patching the LookUp column, and not the TPS UID field (which I am assume is the Dataverse GUID based on the error message).

     

    I would suggest you remove "TPS UID" from your Patch statement and replace with the actual name of your LookUp field.

     

    'Your LookUp Column': NewCloneRecord.TPS,

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard