Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have two identical lists on the same site, with exactly the same columns that I would like to consolidate into one list. The reason I created two is because there are two groups of individuals that should only be able to view/edit the items of their respective group. We are looking to create a consolidated list with full list functionality that the managers can review. Is this possible?

share|improve this question
1  
Are you still trying to maintain both of the original lists as is and just surface the data into one view? Or entirely nix the second list and permanently merge both lists into one? –  RJ Cuthbertson Aug 24 '12 at 16:49

2 Answers 2

Yes it is, but you will need to code a console application or perform this in powershell (harder in my opinion). (this is really if you want to fully merge them and them not to appear merged else look up linking sharepoint lists on google)

If you have visual studio and some .net coding experience this should be a simple task.

Some off the cuff code as an example and a start point only:

using (SPSite site = new SPSite(url))
{
    using (SPWeb web = site.OpenWeb())
    {
        SPList usersList1 = web.Lists[strListName1];
        SPList usersList2 = web.Lists[strListName2];
        SPList mergeList = web.Lists[strMergeList];

        ..loop through list 1, check if item in list 2, if it isn't add to merge list

        ..loop through list 2, check if in merge list, if it isn't add to merge list

        mergeList.Update();
    }
}

There are plenty of ways you could optimise the process, and it depends totally on the data you need to check.

I would use a new list too collect the data 100% of the time in this situation in case something goes wrong. Belts and braces.

Good luck, if you need anything else shout.

share|improve this answer
    
And how Could do this in PowerShell ? –  Grzegorz Z May 20 '13 at 13:33
    
The code is almost identical. $site = Get-SPSite url.. etc here is a nice little example of using lists in powershell robertkuzma.com/2012/09/… –  Hugh Wood May 20 '13 at 13:38

There is no OOTB way to present two separate lists as a single list with full list functionality for your managers.

If you want to keep the lists split in two you can show a consolidated view using Content By Query WebPart, but it'll by no means be full list functionality.

If you want to provide your managers with full list functionality for all the items, but limit the two groups to each their part, then a more appropiate solution might be:

  • Create a single list
  • Only give managers access to the list
  • Create two folders
  • Break inheritance on the two folders and give each group read/write access to their own folder
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.