cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Divya_Vishnu
Helper III
Helper III

Merge two list items into one item

Hello,

 

I am struggling to find a solution for the below scenario.

I have a powerapp form which has  sections for multiple users to complete at the same time say like Q1-Q10 will be updated by one user and the rest of questions will be updated by another user at the same time. 

So my idea was to when they submit the form it will be 2 sharepoint entries and then merge using the unique Assessment ID.

But I don't know how to implement it. Do we have any other options to implement this?

 

Any help would be appreciated.

 

Thanks

Divya

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Divya_Vishnu ,

 

Please try:

Patch(
  List1,
  LookUp(List1,ID="id1"),
     Patch(
         LookUp(List1,ID="id1"),
         LookUp(List1,ID="id2")
     )
);
Remove(List1,LookUp(List1,ID="id2"))

 

Best Regards,

Bof

View solution in original post

6 REPLIES 6
Raksh1Wadel
Resolver I
Resolver I

Hi @Divya_Vishnu 

refer to this link it will help you to resolve your issue.

Solved: PowerApps merge two SharePoint list and display in... - Power Platform Community (microsoft....

 

If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

Hi @Raksh1Wadel ,

 

My case is not actually merging 2 sharepoint lists but two items in a sharepoint list into one items. these two items have a unique ID but i don't know how to combine.

v-bofeng-msft
Community Support
Community Support

Hi @Divya_Vishnu ,

 

You could use Patch to merge two items.

 

Patch(
  LookUp(List1,ID="XX"),
  LookUp(List2,ID="XX")
)

 

Best Regards,

Bof

Hi @v-bofeng-msft ,

 

I don't have a list2 to patch. I have only 1 list and i want to merge two items in the same list to one.

Is there a way to do it?

Hi @Divya_Vishnu ,

 

Please try:

Patch(
  List1,
  LookUp(List1,ID="id1"),
     Patch(
         LookUp(List1,ID="id1"),
         LookUp(List1,ID="id2")
     )
);
Remove(List1,LookUp(List1,ID="id2"))

 

Best Regards,

Bof

Drrickryp
Super User
Super User

@Divya_Vishnu 

If you want two records with the same ID, it sounds like a one to many relationship.  If so, I suggest a second list for the child records.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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