Working with Current User Filter web part in SharePoint 2013 Online

Working with Current User Filter web part in SharePoint 2019

In this post, we will discuss how to work with the Current User Filter in SharePoint 2013 Online. We will use the Current User Filter web part with a list view web part. In this particular example, I have a sample list which has two columns one is Title and CreatedByFirstName. Here we will filter the records based on logged in user’s first name.

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.

Also, read:
Deploy Administration approved InfoPath forms in SharePoint 2013

SharePoint 2013 online Show color in a different color based on status column value in SharePoint 2013 using Calculated column

SharePoint 2013 Document library checkboxes missing after migration from Moss 2007 to SharePoint 2013

Here is our list.

Working with Current User Filter web part in SharePoint 2013 Online
Working with Current User Filter web part in SharePoint 2013 Online

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 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 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:

Working with Current User Filter web part in SharePoint 2013 Online
Working with Current User Filter web part in SharePoint 2013 Online

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

Working with Current User Filter web part in SharePoint 2013
Working with Current User Filter web part in SharePoint 2013

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

Working with Current User Filter web part in SharePoint 2013 Online
Working with Current User Filter web part in SharePoint 2013 Online

But here our requirement is to filter based on the First Name. So I need logging in 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.

Working with Current User Filter web part in SharePoint 2016
Working with Current User Filter web part in SharePoint 2016

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.

Working with Current User Filter web part in SharePoint 2013 Online
Working with Current User Filter web part in SharePoint 2013 Online

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:

Working with Current User Filter web part in SharePoint 2019
Working with Current User Filter web part in SharePoint 2019

Then in 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:

Working with Current User Filter web part in SharePoint 2013 Online
Working with Current User Filter web part in SharePoint 2013 Online

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:

Working with Current User Filter web part in SharePoint 2013 Online
Working with Current User Filter web part in SharePoint 2013 Online

Hope this will be helpful.


You May Also like the Following SharePoint Online Tutorials:

About 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

View all posts by Bijay Kumar →