2

I'm creating a Sharepoint Online site which stores our client documents. Currently, it's set up so there are three libraries (applications, performance, and misc.) and each document uploaded there has a column that identifies the client ID that it is associated with.

Ideally, what I'd like to do is have another site which has folders/libraries with each client ID as the title, and have a view that will reference the ID in the title and display all associated documents from across the other 3 libraries.

Is this feasible at all? If not, is it possible to have something (maybe a page) that the end user can input a client ID search/filter and have all the documents show up? I saw that it's possible using a content search web part, but I want to be able to filter by client name. I'm open to any ideas that would work, though.

The idea behind it is to store all similar documents in individual libraries, but be able to find all documents related to a client in a single place. I'm new to Sharepoint so I'm learning as I go along; thanks for your help!

2

This is pretty much exactly what a Content Search Web Part is for—aggregating content from multiple sources into one central location. There shouldn't be anything about it preventing you from filtering by a client ID though, so long as you configure your client name property to be queryable in the search schema of your Search Service application. This may involve adding or editing a crawled property, which you can read more about in this technet article.

Assuming you map the crawled property as ClientID, you can define the query of your CSWP as:

contentClass:STS_ListItem_DocumentLibrary
AND (path:"http://path/to/Library1" OR path:"http://path/to/Library2" etc...) 
AND ClientID=[Filter]

Replace [Filter] with the filter of your choice. The filter you use can be dynamic. One common option is to add a Search Box web part to the page (under the Search category) and define your ClientID filter clause as:

ClientID={SearchBoxQuery}

Whatever your user enters into the search box will be used as the filter for your ClientID. Here is an article with some other filter tokens you can try:

https://technet.microsoft.com/en-us/library/jj683123(v=office.15).aspx

  • So would the end user be able to enter a client ID and filter through that? I was a little confused on the wording; I thought I would have to create a preset filter. – user1599833 Apr 7 '17 at 14:38
  • I added some additional information about dynamic queries. This should definitely be possible. – xrode Apr 7 '17 at 15:40
  • Sorry for the late reply - this did the trick. Thanks! – user1599833 Apr 13 '17 at 22:07

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.