I have a list and for example in my list there is a column called "Go to" and this column has values "user1", "user2" and "user3".
I want my list items which have "user1" value just be visible to user 1 or just user 1 have the ability to edit it and other users cannot edit or see this item; and the same procedure for other items and "user2" and "user3".
How should I do this?
-
1Aramesh, do you want the items visibility based on the value of "Go to" column? I thought people misunderstood you or I did..? and I got it correct you have to work on Item level permissions!– Arsalan Adam KhatriNov 8, 2012 at 10:02
-
Yes I want visibility based on the value. When a value is "1" this item for example is visible for user 1...– MRArameshNov 8, 2012 at 10:16
4 Answers
Requirement 1: For making logged in user specific items visible - only
Modify the list's view. Add a filter where "GO TO" = [Me]
Requirement 2: Making the item editable by only the "Goto" user
Below are the options:
DISABLE (SEE + EDIT) for other users Use target Audience for each item
DISABLE (EDIT) for other users On Item Editing EVENT HANDLER, you can check the current user against "Goto" & accordingly procced further OR display error message
You need to modify the view and set Go to column to [Me]. This way user's will be able to see items based on Go To column. Please note, this doesn't mean the users will be able to edit the items. You can for example give users Contribute permissions on the list and that way they will be able to edit the items as well.
Aramesh,
You need to set Item Level permission on ItemAdded Event Receiver..
Please have a look at Setting Item Level Permissions Programmatically
Here is How to create Event Receivers on List Item
I hope this helps!
check this link it helps condition is Assigned to You