0

I am creating a landing page and was wondering how the filters works. Specifically, I want lists to be filtered depending on the user's permissions. So a user with contribute permissions for group A will only be able to see created items from group A in a specific list.

0

there is no out of the box method that will do what you want. You have several methods you can do.

1) the least ammount of coding possible would be to query the list based on user to only display items attached to that user only! this would be done using sharepoint designer to add the query directly to the allitems.aspx page for the list view. You could create a custom allitems and do it on that.

http://sharepointlogics.com/2014/02/how-to-filter-sharepoint-list-based-on.html

2) create a custom webpart, the code would get the list populate a datagrid, use query to only return data on current user or group

create webpart

http://msdn.microsoft.com/en-gb/library/dd584174(v=office.11).aspx

get items from list

http://msdn.microsoft.com/en-us/library/office/ms456030(v=office.14).aspx

use the same spquery as above but using code below

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spquery.aspx

3) other solutions:

again edit the view with a filter (more on the lines of what your asking for) look at anand answer.

Show list items depending on a user

todo the above. you need to create a view within the list settings. once in the list settings create a custom view or

click on the third item to the top left (2013) and similar on 2010 - for 2007 you need to do above by going into the list settings and create a view from there. enter image description here

when your in the view you can then do:

within the page settings for the view scroll down to filter and select the following:

enter image description here

save and exit, now within the list set that view as default. reload page, all done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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