SharePoint Online search result web part display documents created or modified by current user

In this SharePoint search tutorial we will learn how to use SharePoint Online search result web part to display documents created or modified by the current logged in user.

We will see how we can add a search result web part to a web part page and configure search result web part to display logged in user’s documents in SharePoint Online.

Add a Search result web part to a web part page in SharePoint Online

Now we will see how can we add a search result web part to a web part page in SharePoint Online.

To add the “Search result” web part, click on “Add a web part” on the web part page in the edit mode. Then click on the “Search Results” web part from the “Search” categories.

search results in web part SharePoint online
search results in web part SharePoint online

Display Documents last modified by logged in user in SharePoint Online Search result web part

Now we will see how to display all last modified documents by the logged in user. So for that edit that particular web part properties. In the “Properties for Search Result” page clcik on “Change query”.

search result web part SharePoint online
search result web part SharePoint online

Now build your Query page will open. In the Advanced mode select the “Documents(System)” from the drop down. Then switch to the “Quick Mode”.

SharePoint 2013 search results
SharePoint 2013 search results

Quick mode page in the “Query text” add “ModifiedBy:{User.Name}”. Then clicked on “Test Query”, in the “Search Result Preview” we can see all the documents which is the logged in user modefied. Clicked on OK.

SharePoint online search results in the web part
SharePoint online search results in the web part

When we expand the “Settings” from the “Search result properties page” we will get the below option. We can set how many item we want to display in the page. Here I have set to 10 items.

In the down of settings page, we can see “Show Pagging” option. If we enable it then the search result is coming in the pagging format. Here I have enabled it.

search result web part SharePoint 2013
search result web part SharePoint 2013

After the editing completed save the page. Now our web part page will look like below screenshort.

search results in web part SharePoint 2013
search results in web part SharePoint 2013

Display documents created by logged in user in SharePoint Online Search result

Here we will see in the search result web part, how to display the documents which are created by the logged in user or the current user.

Like the modified by the same thing can be followed here. In the “Query text”, I have added “CreatedBy:{User. Name}”. Clicked on “Test Query”. Click on Ok and save the page.

search results in web part SharePoint online
search results in web part SharePoint online

The below out put will come in the web part page.

search results in web part SharePoint 2013
search results in web part SharePoint 2013

You may like following SharePoint search tutorials:

This SharePoint search result we saw how to display documents which are created and modified by logged in user or current user in a search result web part in SharePoint Online.

>