.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Using Me to Filter in Users in SharePoint

Posted By:Jean Paul       Posted Date: July 17, 2014    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

In this article we have explored the [me] parameter to filter in multiple values too in SharePoint

In this article we can explore an additional a real world scenario. The View Filter parameter [Me] can be used to filter one user as well as multiple users.

In our experiment, we are having a List with Members column, which contains multiple users. We need to filter the list based on current user.

For example if there are User1, User2, User3 in the Members column, If User1 is logged in; he should be able to see the item. We can apply the [Me] tag to filter in multiple selection column too.

Step 1 Create Projects list

Open your SharePoint site & create a List of type  custom & name it as Projects.


Open List Settings & choose the Create Column option.


Enter the new column name as Members of type Person or Group and allow multiple values, as shown below.


Click the OK button to continue.  After adding the column your list columns looks like below.


Step 2 Create Users

We need 3 users for our scenario.

1. If you are using Windows client operating system, use Control Panel to add the users

2. If you are using Windows server operating system, use Active Directory to add the users

User 1: Employee 1

User 2: Employee 2

User 3: Manager

Please ensure you have added Password for all the 3 users. (else certain browsers won't allow login without password)


Now we are ready with our 3 users.

You need to perform the following to bring the above 3 users within SharePoint.

1. Go to Central Administration > Services > Stop User Profile Synchronization Service

2. Run IISRESET command after few seconds

Now, add the 3 users to the Site Members group.  Open Site Actions > Site Permissions > Find Members group > Add users


Click the OK button & now the new 3 users have Contribute permissions to read/modify list items.

Step 3 Add Data

Now we are ready to add some data to the list.    

Open the list & add Project 1 with Employee 1 & Manager


Open the list & add Project 2 with Employee 2 & Manager


Now we are ready with following 2 items.


Please note that Employee 1 have only 1 project associated & Employee 2 have only 1 project associated.

The current view shows both the records, regardless whoever is logged in.

Step 4 Create View Filter


Now we can create our View Filter.  Go to List Tab of Projects list & click the Create View button.

In the appearing window choose the Standard View as shown below. 


In the appearing page, enter the view name as Current User View & make it as the default, as shown below.


Scroll down to the bottom & in the Filter section add the following:


Please note that we are enabling a filter which checks the Members column is equal to the current logged in user which is denoted through [me].

Click OK button to continue.

Step 6 Test It

Now from the user menu on the right hand side, choose the Sign in as Different User option.


Sign in as Employee 1 & you should see the current items.


Please note that the Employee 2 item is hidden as per the View Filter.




In this article we have explored the [me] parameter to filter in multiple values too.

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend