cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Patching between two separate SharePoint lists

Hello, 

 

I need some help with Patch function. I would like to take a value from "Edit Form" (SHarePoint1) and Patch it with another SharePoint List2

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@VS325,

Based on the issue that you mentioned, do you want to patch a field value from SP list1 to another field in SP list2?

Could you please tell me that what the column type of these two fields, are they the same column type?

1). If you want to patch to an existing record, you should refer to the primary key within the SP list2.

Try the following formula:

Patch(SPList2,LookUp(SPList2,ID=1),{Title:DataCardValue1.Text})

Note: I assume that you want to specify the first record to patch to, and the Title in SPList2 is the aimed column.

DataCardValue1.Text represents the value of the control within the Edit Form.

2). If you just want to save as a new record, you could directly use the Defaults() in the Patch() function.

Patch(SPList2,Defaults(SPList2),{Title:DataCardValue1.Text})

Hope it could help you.

Regards,

Qi

 

Best Regards,
Qi

View solution in original post

2 REPLIES 2
Drrickryp
Super User
Super User

Hi @Anonymous 

Assuming that you have an ID field in SPlist2 called SPlist1ID, you would have something like this

Patch(Splist2,Splist1ID=ThisItem.ID,{field:..
v-qiaqi-msft
Community Support
Community Support

Hi@VS325,

Based on the issue that you mentioned, do you want to patch a field value from SP list1 to another field in SP list2?

Could you please tell me that what the column type of these two fields, are they the same column type?

1). If you want to patch to an existing record, you should refer to the primary key within the SP list2.

Try the following formula:

Patch(SPList2,LookUp(SPList2,ID=1),{Title:DataCardValue1.Text})

Note: I assume that you want to specify the first record to patch to, and the Title in SPList2 is the aimed column.

DataCardValue1.Text represents the value of the control within the Edit Form.

2). If you just want to save as a new record, you could directly use the Defaults() in the Patch() function.

Patch(SPList2,Defaults(SPList2),{Title:DataCardValue1.Text})

Hope it could help you.

Regards,

Qi

 

Best Regards,
Qi

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,340)