View (or filter) document library items by Groups

Hello
I have a bunch of documents in a library.
I would like specific groups to see specific documents.
For example, Group 1 can read Document A and Group 2 can read Document B but Group 1 and 2 should be able to read Document C. Some of the groups can edit, some can read.
I ended up creating a column with Target Audiences and applied each document with the correct Target Audience (group). 
Then, I created a view for each of the target audiences.
That seemed to work ... however, the All Documents view is sitting there. And someone can just click on it and see all the documents. 
So, I tried to make the All Documents view filter for only Site Owners but that didn't work.
And, what's to stop someone from searching for Site Contents and finding all the documents there?
Does anyone have any advice on how I can lock down these files to user groups please?
Thanks.
Mel

Hi
check this doc
http://sharepoint-community.net/profiles/blogs/how-to-security-trim-search-results-in-sharepoint-2013
Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

Similar Messages

  • Different View for same document library on a Wiki Page

    Hi,
    I am developing a Provided hosted app which have a functionality to create a document library with two Views. Also we need to show this document library in a wiki page with two different views.
    I am using CSOM (C#). I am able to create the document library and the two views programmatically. But when I add the document library in the wiki page the default view (All Documents) is shown for both the web parts. There is an hidden view created with
    the WebPartDefinition from the xml provided through code. 
    Through CSOM we are able make a View as default with the link below.
    http://sharepoint.stackexchange.com/questions/90433/add-document-library-xsltlistviewwebpart-using-csom-or-web-services
    In my case both the webparts will get the same view, where I need different view for same document library in a wiki page.
    Also I tried to update the web parts with the following code.
    string viewString = @"<View Name='{0}' MobileView='TRUE' Type='HTML' Url='/SitePages/Home.aspx' Level='1' BaseViewID='1' ContentTypeID='0x' ImageUrl='/_layouts/15/images/dlicon.png?rev=23' >
    <Query><Where><Eq><FieldRef Name='KeyDocument'/><Value Type='Boolean'>1</Value></Eq></Where></Query>
    <ViewFields><FieldRef Name='FileLeafRef'/><FieldRef Name='DocumentOwner'/><FieldRef Name='Modified'/>
    <FieldRef Name='_UIVersionString'/><FieldRef Name='Editor'/></ViewFields>
    <RowLimit Paged='TRUE'>30</RowLimit><JSLink>clienttemplates.js</JSLink><XslLink Default='TRUE'>main.xsl</XslLink>
    <Toolbar Type='Standard'/></View>";
    WebPartDefinition wpd = wpfound.FirstOrDefault();
    string formattedstring = String.Format(viewString, wpd.Id);
    wpd.WebPart.Properties["XmlDefinition"] = formattedstring;
    wpd.SaveWebPartChanges();
    web.Context.ExecuteQuery();
    I created two views (viewString) as shown above.
    The above code did not throw error, but it did not update the web part.
    Please advise how to move forward.

    Hi Samir,
    When we click outside of the list view webpart on a webpart page (or allitems.aspx page) with containing multiple webparts, the list view webpart will lose the focus, and the selected items will be deselected, this is by design.
    You can look at the following article with using the approach/workaround of Javascript to prevent the specified list view webpart from losing focus.
    http://sharepoint.stackexchange.com/questions/44360/list-view-loses-focus-when-additional-webpart-added-to-page
    //Set focus on our list web part
    var webPart = document.getElementById('WebPartWPQ1');
    WpClick({target: webPart});
    //Prevent it from losing focus
    SP.Ribbon.WebPartComponent.$3_1.deselectWebPartAndZone = function() { };
    Thanks
    Daniel Yang
    TechNet Community Support

  • SharePoint 2013 : Add annotation to document library item

    Hi all,
    Is there a possibility to add annotation to library items. Example, I am sharing a document library item to a user then the user add an annotation and share to another user.  The other user also should add his/her comments on the item.
    Can anyone help me how to achieve this?
    Many thanks & regards
    Vinay

    We've done this in the past using a Rich Text Field in the metadata of the document.  You can set it up so it Appends new entries to the bottom of the field instead of replacing the existing content.  When a user edits the metadata they see a
    blank field.  When they save it their comments are added to the bottom with their name and a timestamp.  We've used it primarily on issues lists, but it should work on a document also.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Enable Merge Documents and Relink documents views for a document library

    Hi All,
    I would like to have Merge Documents and Relink documents views for a document library (not a form library). I was able to see Combine.aspx and Repair.aspx in the document library open with explorer -> Forms folder. How do I enable these two views?
    Your help would be greatly appreciated. Thanks a lot.
    Merge Documents -> /Forms/Combine.aspx
    Relink Documents -> /Forms/repair.aspx

    These two views is actually hidden in SharePoint library, you can enable it by set hidden property to false.
    download SharePoint manager, then find the site, root to the specified library, click views, find the Merge documents view, you will see that the Hidden propery is by default set to true.
    http://spm.codeplex.com/releases/view/97332
    Qiao Wei &lt;br/&gt; My blog:<a href="http://blog.goobol.com">http://blog.goobol.com</a>

  • Document Library + Items Color

    Hi All,
    Welcome to SharePoint products & Technologies.
    How to Change the color of the Document library items based on the field values? for eg., I have a column called "Status", based on this field values the color of the items should change accordingly.
    Can any one help me out on this issue.
    Let me know if you are not clear or need more information
    Regards,
    SpUser.

    Hi,
    Sorry for the late reply .Could not check the blogs.Here is the script to be put in content editor webpart:-
    <script language="javascript" type="text/javascript">
      var x = document.getElementsByTagName("td") // find all of the TDs
      var i=0;
      for (i=0;i<x.length;i++)
        if (x[i].className=="ms-vb2") //find the TDs styled for lists
          if (x[i].innerHTML=="In Process")
            x[i].parentNode.style.backgroundColor='lightyellow'; // set the color
    if (x[i].innerHTML=="Accepted")
            x[i].parentNode.style.backgroundColor='lightgreen'; // set the color
    if (x[i].innerHTML=="Not Accepted")
            x[i].parentNode.style.backgroundColor='red'; // set the color
    if (x[i].innerHTML=="Need More Info")
            x[i].parentNode.style.backgroundColor='lightblue'; // set the color
      } </script>

  • Not able to create sub folder using SharePoint web service in large SharePoint document library (Item count view threshold limit)

    We are trying to create folder & subfolder in a SharePoint document library using SharePoint default(dws) web service. Document library has unique permission as well as item level permission. It was working as expected. Once item count crosses
    view threshold limit ( 5000) , create folder web method completes with an error and it creates a folder in SharePoint.
    Request:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dws="http://schemas.microsoft.com/sharepoint/soap/dws/">
       <soapenv:Header/>
       <soapenv:Body>
          <dws:CreateFolder>
             <!--Optional:-->
             <dws:url>Shared Documents/VenTest02092015v1</dws:url>
          </dws:CreateFolder>
       </soapenv:Body>
    </soapenv:Envelope>
     Response:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
          <CreateFolderResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/dws/">
             <CreateFolderResult>&lt;Error ID="2">Failed&lt;/Error></CreateFolderResult>
          </CreateFolderResponse>
       </soap:Body>
    </soap:Envelope>
     While trying to create subfolder under the above created folder service throws an exception saying
    FolderNotFound.
    Though we are able to create subfolder from SharePoint UI successfully. 
    Request
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dws="http://schemas.microsoft.com/sharepoint/soap/dws/">
       <soapenv:Header/>
       <soapenv:Body>
          <dws:CreateFolder>
             <!--Optional:-->
             <dws:url>Shared Documents/VenTest02092015v1/REQ-1</dws:url>
          </dws:CreateFolder>
       </soapenv:Body>
    </soapenv:Envelope>
    Response:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
          <CreateFolderResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/dws/">
             <CreateFolderResult>&lt;Error ID="10">FolderNotFound&lt;/Error></CreateFolderResult>
          </CreateFolderResponse>
       </soap:Body>
    </soap:Envelope>

    Yes, you're probably hitting the 5000 list item threshold (
    http://sharepoint.stackexchange.com/questions/105937/overcoming-5000-file-document-library-limits ). I assume you can do it via the UI because you're probably logged in as an admin in which case, out of memory, the threshold is 20.000 items. You can extend
    this limit, but you probably shouldn't.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Document library Permission - users/group can add/upload/modify but same time not to see other documents

    Hi,
    I have a question regarding SharePoint document library permission. I am using SharePoint 2013.
    I have 3 SharePoint groups (SP-Group-NL, SP-Group-US & SP-Group-BR).
    I have given the contribute access to all 3 groups in the document library, so that people can with in these group can upload/add/modify document inside it.
    Now I want that people from specific group can only view those document which they uploaded and not all.
    Note - (a) I don't want to use audience targeting. (b) I don't want to right any code.
    Regards,
    Yogendra

    Hi Yogendra,
    Per my understanding, you might want users in a specific group can view only the documents uploaded by themselves.
    In the OOTB list view settings, we can set filter on a list view to only display the documents created by the current user:
    However, if you want this filter only apply to users in a specific group, Audience Targeting or custom code would be required as there is no such OOTB feature in SharePoint
    list can meet this requirement.
    With Audience Targeting, a possible solution is that, we can add two list view web parts into one page, set Audience Targeting on one of them to display only when
    the current user is in the specific group, then modify the view settings to apply filter on this list view web part to make it only display the documents created by current user.
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to set Document Library Item Limit at Site Collection level?

    Hi,
    I have SharePoint which contains one Site collection with many Sites. Each sites has many document library.
    Actually my requirement is, End Users  wants to see only 10 items per page in document library. We can manually set by using "Item Limit" option but i could not set that for around 150 document libraries.
    Is there any possible to set that in Site Collection level?
    Thanks & Regards
    Poomani Sankaran

    You can run for each loop and use below code
    http://get-spscripts.com/
    #Get the site and list
    $web = Get-SPWeb "http://portal/sites/testsite"
    $list = $web.GetList(($web.ServerRelativeUrl.TrimEnd("/") + "/Shared Documents"))
    #Get the list view to be changed
    $newview = $list.Views["Sort by modified date"]
    #Set the mobile and default mobile view properties
    $newview.MobileView = $true
    $newview.MobileDefaultView = $true
    #Update the view configuration
    $newview.Update()
    $web.Dispose()
    $web.Lists[0].Views[0].RowLimit=30
    $web.Lists[0].Views[0].Update()
    How you can get all list using powershell
    http://sharepointrelated.com/2011/11/28/get-all-sharepoint-lists-by-using-powershell/
    If this helped you resolve your issue, please mark it Answered

  • Document library items are not displaying in sorted order in sharepoint 2013

    Hi,
    I have a document library , I am storing document sets on it.
    28326 items are there in the library.
    I have configured sort on Name columns. Initially items are displaying in sorted order like (A,B,C,D,E...)
    Now Items are not displaying in a sorted order it is displaying like (A, B,C,D,E,A,C...) like this.
    Please help me on this sorting issue.
    Thanks,
    Samir

    Are the documents displaying in your image inside the document sets?  If so then your sets (folders) are displaying in alphabetical order and the documents inside the sets are displaying in alphabetical order.  This is what i would expect.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Show the last published documents in a view for a document library.

    Hello!
    At our company we have a document library with many documents. These documents are evolving and are therefore going from major versions to minor versions to major versions again. To be able to get a good overview of the last "official" versions
    we would need to have a view that shows the last "Approved" versions of each document (if any approved versions exist). This is basically the same as watching the document library from a user that only own reading access and therefore only sees the
    "published" versions.
    In our case this view should be used by people that own editing rights as well to the documents. 
    Is it possible to accomplish this?
    I tried to use the tip from the following site: link 
    The "?IncludeVersions=TRUE"
    did not work though. 

    Hi AndersObserve,
    I understand that you have a document library that you have enabled content approval(if not, enable it) and versioning, then
    you want to create a view to filter major(approved) documents, then you can filter on the ApprovalStatus field. Try to create a new standard view, filter the view when the ApprovalStatus is equal to Approved, then the view will display the published version
    document.
    Best Regards.
    Kelly Chen
    TechNet Community Support

  • Sharepoint 2013 / Office 365 Document library item level permissions problem

    Hello,
    I'm looking for a solution to enable users to upload documents to a document library, the ability to view other documents uploaded to the same document library, but able to edit or delete those other documents.
    With a list you can use Item-Level security in Advanced Settings but this is not available for Document libraries. I could use workflows to assign individual permissions to document, but the the library already contains over 2,000 documents and will continue
    to expand so I don't like the idea of having that many individual permissions set.
    Are there any 3rd party plug-ins or solutions to this issue?
    Thanks,

    Try below:
    http://www.hersheytech.com/Blog/SharePoint/tabid/197/entryid/28/Default.aspx
    As it turns out the, setting Item-Level Permissions in a library is fully supported with PowerShell!
    The PowerShell commands for changing this are very simple:
    $web = Get-SPWeb http://YourSite/
    $list = $web.Lists[“Your Document Library Name”]
    $list.ReadSecurity = 2
    $list.Update()
    $web.Dispose()
    Note the 3rd line which is where you determine the value for this setting using the following values:
    1 = “Read all items”
    2 = “Read items that were created by the user”
    If you wish to modify the values for Create and Edit access instead, replace .ReadSecurity with .WriteSecurity with
    the following values:
    1 = “Create and edit All items”
    2 = “Create items and edit items that were created by the user”
    4 = “None”
    For example:
    $web = Get-SPWeb http://YourSite/
    $list = $web.Lists[“Your Document Library Name”]
    $list.WriteSecurity = 2
    $list.Update()
    $web.Dispose()
    Also check 
    http://sppermissions.codeplex.com/
    If this helped you resolve your issue, please mark it Answered. You can reach me through http://freeit-support.com/

  • Document Library items delete

    Hi ,
    I have a Document Library. I created one custom view through code.
    in that, i need to show a DELETE option. i already did that.
    Question is, only document owners only should have the right to delete those doc's. Others should not delete.
    For a list, we have ITEM LEVEL PERMISSION option. Like that , is there any way to achieve  that?
    How to do that.?

    Hello,
    Just create a designer workflow for  your requirement.
    Execute that workflow when an new document gets added under library.
    The functionality of the workflow is as follows
    When a new document get added, you workflow will set contribute access to the owner of that document and will set read access to rest all other users.

  • Update document library item where a docx document uploaded using powershell script

    HI
    when i update an existing item of a document library using script i faced the issue.
    i uploaded two .txt files and two word docx files and a png file.
    where i update .txt file item there is no issues , but  for other items i have problem.
    PS C:\Scripts> C:\Scripts\UPdateDocLibrary.ps1
    Exception calling "Update" with "0" argument(s): "There is no file with URL 'Do
    cs/Emc.docx' in this Web."
    At C:\Scripts\UPdateDocLibrary.ps1:26 char:13
    + $item.Update <<<< ()
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : DotNetMethodException
    Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue
    $webURL = "http://tspmcwfe:89"
    $listName = "Docs"
    #Get the SPWeb object and save it to a variable
    $web = Get-SPWeb $webURL
    #Get the SPList object to retrieve the "Demo List"
    $list = $web.Lists[$listName]
    $items = $list.items
    #Go through all items
    foreach($item in $items)
    if($item["NO"] -eq $null)
    $item["Title"] = "My updated edited item!"
    $item.Update()
    adil

    Please check if file is checkout or locked , and if not then checkout it and then try to update -
    $url= $webURL + $item.File.Url;
    $file = $web.GetFile($url);
    if($file.CheckOutType -eq "None" -And $file.LockType -eq "None")
    $file.CheckOut();
    also please try these option, may help -
    1. Allow unsafe update at web
    $web.AllowUnsafeUpdates=$true;
    2. try systemupdate
    $item.SystemUpdate($false)
    Thanks
    Ganesh Jat [My Blog |
    LinkedIn | Twitter ]
    Please click 'Mark As Answer' if a post solves your problem or 'Vote As Helpful' if it was useful.

  • Writing modified date of a document library item through CSOM.

    I´m working on an application which is replicating files from one document library to another. Since it is a replication, I want the modified date to be preserved when I copy the file from the source library to the target, so that the user will see the real
    modified date in the target library and not the date of the replication run.
    I access SharePoint through the client side object model and I have been able to set the modified date on a SharePoint 2010 on-premise using the following straght-forward code:
    var listItem = list.GetItemById(id);
    context.Load(listItem);
    context.ExecuteQuery();
    listItem["Modified"] = "03/11/1999";
    listItem.Update();
    context.ExecuteQuery();
    Unfortunately when I execute the same code on any other SharePoint (2013 On-Premise, 2013 Online or 2010 Online) the code will execute without any errors, but the modified date will not be changed at all.
    My actual question is: Is there any possibility to change the modified date throught CSOM on all of these SharePoint-versions?

    I got a work around for this problem..
    Before updating the Modified, Modified By values, First we need to Disable the version settings for document library. Once the fields updated then again we need to enable the version settings. 
    find the updated code below..
                                          //Disable Version settings for DOC LIB
    before update Metadata
                                            _List.EnableVersioning
    = false;
                                            _List.Update();
                                            _cContext.ExecuteQuery();
                                           ListItem item = newFile.ListItemAllFields;
                                           _cContext.Load(item);
                                            //Updating Metadata Created,
    CreatedBy, Modified, Modified By
                                             item["Created"]
    = "8/10/2013 7:04 PM";
                                             item["Author"] = CreatedUserValue;
                                             item["Modified"] = "8/10/2013 7:04 PM";
                                             item["Editor"] = ModifiedUserValue;
                                             item.Update();
                                            _cContext.ExecuteQuery();
                                            //Enable Version settings
    for DOC LIB after update Metadata
                                               _List.EnableVersioning
    = true;
                                              _List.Update();
                                            _cContext.ExecuteQuery();
    Rajendra

  • How to avoid postback while filter document library using metadata navigation filters?

    Hi All,
             Please help me with this scenario. I have a document library with metadata columns and normal columns and have enabled metadata navigation settings and key filters.
            It filters fine. But only problem every time i click the whole page will refresh. is there any way we can avoid page refresh while filtering.
    Or
    Any alternative solutions also much appreciated.
    Thanks for your help in advance.

    You're not going to be able to avoid that post back. The pages haven't been designed to allow AJAX behaviour and trying to re-build them would be a monster for MS let alone for you.

Maybe you are looking for

  • The new iPad first battery charge issue

    I just got the new iPad, I waited for the battery to die and the I let it charge for 14 hours and it only charged from 2% to 37%, then I changed the power cord and the outlet and it took it 5 hours from 37% to 100%. Is this normal? 19 hours from 2% t

  • Objects in master slide disappear

    Hi, I got a problem with my master slides. I don't know why, but in some projects (not all), at some point, some objects (not all) in the master slide disappear. They are in the timeline, but we cannot see them in the document window display nor in t

  • Display automatically dims after a minute or so

    Hi, My display dims after a couple of minutes of inactivity which can be quite annoying if you are viewing a movie etc, I cant find the setting which controls this, any clues people J

  • Spry Menubar items reversed

    Really stumped. The Spry horizontal menubar items appear in verse order in Dreamweaver (Mac) and in preview. I tried entering the items in reverse order, to get them in the correct order. That works...except that Internet Explorer on my Dell laptop (

  • How to import iCal data

    from Mac OS X 10.6.8 to Calendar in Mountain Lion 10.8.5?