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 to create item i...
Power Apps
Answered

Patch to create item in another list

(0) ShareShare
ReportReport
Posted on by

Dear community, when I open the list item in edit mode and click on create item icon in SharePoint list item, an item should get created in another list with same values some of them are choice, multiline text, lookup and person field. Is it possible to use patch function here to create new item and update if item already exists? Many thanks.

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

    @Vaibhav_k 

    You can use the OnSuccess property of the form to do the patch.  However you have to have a field in the second list that matches the ID of the current list.  So if there is a field in list2 that is ParentID, then 

     

     

    If(IsBlank(LookUp(List2,parentID=Form1.LastSubmit.ID),
     Patch(yoursecondlist, Defaults(yoursecondlist),{parentID:Form1.LastSubmit.ID
     field1:Form1.LastSubmit.Field1, 
     field2:Form1.LastSubmit.Field2,...}),
     Patch(yoursecondlist,parentID=Form1.LastSubmit.ID,{field1:Form1.LastSubmit.Field1, 
     field2:Form1.LastSubmit.Field2,...}),

     

     

  • Vaibhav_k Profile Picture
    on at

    There are lot of errors I get in this formula after replacing actual list names and field names. Seems This is a pseudo code.

  • Verified answer
    Vaibhav_k Profile Picture
    on at

    I think I should use power automate to create item if it doesn't exist and modify if exists.

  • Verified answer
    Vaibhav_k Profile Picture
    on at

    Simply Used powerautomate to create item if doesn't exist. Else updating if exists. 

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
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard