1

I want a webpart that shows recent modified/created documents by the current user.

I'm now using the content search webpart. I've filtered only on documents and scope is on whole site. I also can filter on specific users.

My question: How can I filter the content search webpart to only show recently modified/created documents by the current user (the person viewing the webpart).

Thank you.

1

I switched the content search webpart to advanced mode and then in the query section, have added the below query:

Author:{User.Name}

See below screenshot, this will bring all the items created by the current user. Here, path is the url of the current site collection which will restrict results to the current site collection.

enter image description here

If you have On Premise environment, and you can see the additional filters section, then you can add it as below:

enter image description here

  • Great! Thank you, this does the trick. I searched 1 hour for this... – Bas Feb 7 '17 at 10:54
  • @Gautam: Hey how I can pass Author:{User.Name} in the search rest api. This is the query I am using var url = "http:../_api/search/query?querytext='AnyText+AND+Author:{User}+AND+ListId:a87b68a9-06fd-421c-ae0e-c93416e7e612+AND+IsDocument=True'"; – Ankit Katiyar Jul 31 '18 at 13:21
  • can you ask this as separate question so that we can open it up to the community ? I am not 100% sure how to do this, might give it a try some time later. I am sure somebody from the community might be able to answer it ! – Gautam Sheth Jul 31 '18 at 14:09
  • @GautamSheth: Here is the link to the question sharepoint.stackexchange.com/questions/246232/… – Ankit Katiyar Aug 1 '18 at 9:29
  • 1
    @AnkitKatiyar - can you try and modify this and check ? – Gautam Sheth Aug 1 '18 at 9:31
0

Alternative options for others who find this thread are:

1 – SharePoint 2013/SharePoint 2016/Office 365

In either a Content Search Web Part or Search Results Web Part, use the system provided Items related to current user result source. This result source displays a rollup of all information – items, documents, and web pages - created by and modified by the current logged-in user, regardless of modifications made by other users.

2 – Office 365

On a modern page add the Highlighted Content Web Part. The web part can be configured to show the logged in user their recent modifications by library, site, site collection, and tenant. Microsoft also provided great layout options for the displayed content.

I have a few additional details at: https://jennyssharepointtips.wordpress.com/2018/12/23/create-a-user-content-rollup/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.