SharePoint Current user filter web part

This SharePoint tutorial, we will see, how to work with the Current User Filter in SharePoint 2013 Online. In the same way, we can use the current user filter web part in SharePoint Online or SharePoint 2013/2016/2019.

We will use the Current User Filter web part with a SharePoint list view web part.

SharePoint current user filter web part

In this particular example, I have a sample list that has two columns one is Title and CreatedByFirstName. Here we will filter the records based on logged in user’s first name using the current user filter web part in SharePoint.

SharePoint has inbuilt filter criteria presented with [Me] which will work with People picker field type, like Created by [Me] or Modified by [Me]. But this will be helpful in other cases where you will not have a people picker, maybe a single line text and you want to filter on other user profile properties like the first name, last name, department, etc.

Here is our custom SharePoint Online list look like:

sharepoint current user filter

Now let us say I am logged in with Bijay Sahoo and here I want to filter records based on First Name. So If I open it should show records where the filter criteria “CreatedByFirstName” is Bijay.

So for this, I have created a sample web part page in SharePoint site. On that page First I add the list view web part (MyTest List).

For this Edit the page -> Add web part than from Categories select “Apps” and then select MyTest list from the list of apps, then click on Add. Once you will Save the page it will display all the records.

Now again Edit the SharePoint web part page and click on Add a Web Part. Then From the Categories Filters -> then add “Current User Filter” web part as shown in the fig below:

sharepoint current user filter web part

Then select the web part and then click on Edit Web part as shown in the fig below:

sharepoint current user filter web part multiple values

Then in the Current User Filter web part properties, you can see like below. It will display the current username in the format of i:0#.f|membership|bijay@onlysharepoint2013.onmicrosoft.com.

sharepoint online current user filter web part

But here our requirement is to filter based on the First Name. So I need logging in the user’s first name. So for this select the second radio button “SharePoint profile value for current user”. Now in this dropdown, it will show what are the properties (user profile properties) are available.

From there select the Last Name as shown in the fig below. You can select as per requirement like department, last name, username, work email, etc. Then click on OK.

sharepoint 2013 current user filter web part

Then edit the web part again. Click on Connections -> Send Filter Values To -> Then select the list [Here it is MyTest]. Here make sure pop up is enabled here.

current user filter web part sharepoint 2016

Then it will display the Choose connection popup. Here in the Connection Type select “Get Filter Values From” and then click on Configure as shown in the fig below:

current user filter web part sharepoint 2019

Then on the next screen (tab). By default, the “Provider Field Name Current User” will come. In the Consumer Field Name select the list column name which you want to filter. Like here I want to filter based on CreatedByFirstName column from the column’s dropdown as shown like below:

current user filter web part sharepoint 2013

Then click on Finish. And Stop editing and save the page.

Now if you will refresh the page, you will be able to see the items created by logged in users the first name as shown in the fig below:

sharepoint current user filter web part

You may like following SharePoint web part tutorials:

Here, we learned how to use the current user filter web part in SharePoint Online or SharePoint 2013/2016.

free sharepoint training

SharePoint Online FREE Training

JOIN a FREE SharePoint Video Course (3 Part Video Series)

envelope
envelope

Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SharePointSky.com

>