The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

r.aurel (2) [Avatar] Offline
#1
Hi,

It is possible to combine two lists (from the same site collection but from different sites) in one ?

I mean ... we have one list at:
http://server.com/sitecollection/site1/listname1/
and
http://server.com/sitecollection/site1/site2/listname2/

the first one is source list and second destination.

I would want to add all the items from the source list to the destination list and merge them together.

The fields from the lists are different, and we have to merge the metadata for the source items there where the fields are the same, or just add the title and all other fields empty. This doesn't mater!

Any advices how i can merge them together?

Tack, Tack!

P.S. This should be a web-part.

Message was edited by:
r.aurel
wictor.wilen (29) [Avatar] Offline
#2
Re: Merge two SharePoint lists
Hi,
can you explain how you would do this as a Web Part? For instance do you want the WP to do the merge the lists when clicking a button or do you only want a visual merge of the lists to be presented in a Web Part?
/WW
r.aurel (2) [Avatar] Offline
#3
Re: Merge two SharePoint lists
Hi,

I would like to add this web part on the same page where is the destination list, then edit the web part and in the menu editor add there some fields where you specify the site and the list name for the source and site name and list name for the destination, that is the current list on this page.

I know how to implement the web part, add the properties and the fields but the actual "merge" of the lists is the issue.

An of course the trick can be done when you press Apply or OK button ...

Br,
Aurel
wictor.wilen (29) [Avatar] Offline
#4
Re: Merge two SharePoint lists
Merging lists can be done in several ways; one is to iterate through the lists and just copy/update/add the items as you like.
To get more ideas please ask the questions on MSDN Forums or SharePoint Overflow.

Cheers
/WW