Performing join between document library and list - sharepoint

I have a document library where i have columns called Title and Category(is a lookup field) and User.Also,I have a list where i am just storing categories. I would like to join both document library and list so that i can dispaly all categories and the documents associated with it. once i get everything i would like to perform filtering so that it dispalys only selected user's documents.The displaying of the documents is working fine but not filtering. My questions is CAn we perform join between doc library and list? Plesae help me.
Thanks

The content query web part (CQWP)is probably the easiest way to do this without code. Since you only have one field in your lookup (categories) you don't need to do a join as SharePoint stores the lookup value in the Document Library. You will need to edit your CQWP to add this field, there is a good tutorial on doing this here. It also explains how to filter your CQWP.
Finally you will need to clean up your lookup field as SharePoint will store the value like this: 1;#Category1.
The CQWP uses XSLT to display the results so in your case you probably don't want to show 1;#Category1 you probably only want to show Category1. You can use the following XSLT to accomplish this:
<xsl:value-of select="substring-after(#Name_Of_Your_Lookup,'#')"></xsl:value-of>

Related

Filtering Notes View UI programmatically in Notes Client

Is there a way to programmatically filter IBM Notes (Lotus Notes) view UI using complex criteria?
For example, if I want to let users specify criteria and then show results in notes view UI all documents with particular status and the particular manager name?
I am aware of #SetViewInfo formula, but as far as I understand it works with only one view column, and I don't understand, how can I apply a criteria, that contains more than one conditions inside, for example: Status="Completed" AND Manager="John Doe" ?
Any ideas?
One solution to this problem is to have a shared private on first use folder for the result set. You would use a form to gather the selection query or fulltext-query and put the documents in the result folder.

Create Unique Sub List within List in Sharepoint Online

Im trying to create a Unique sub list within a list in Sharepoint Online (2013).
I realize that sub lists arent exactly possible and you can use lookup fields to attach another list. This doesn't seem like it will work for my situation.
I am trying to have a list item that allows you to upload unique files per list item. For Example:
Reports May 2015
---School.xml
---Food.xml
Reports Jun 2016
---University.xml
---Beach.xml
Each list item will have a set of unique files related to it.The user needs to be able to make the List item themselves (Reports ... in this case), this will of course have other fields and descriptions attached to it (hence the list) and then be able to upload unique documents to that list item.
Im having problems figuring out how to do this in SharePoint. If there is another way to go about this better i am up for it.
You're right - sublists aren't a thing in SharePoint. Reading your requirements, I'm not sure if you need two lists to get what your looking for. Would it be possible to have a single Document Library with a custom field for "Category" or "Report Month". This field could either be a Single line of text field or Choice field. From there you could create a custom view to group by this field and give the hierarchical view from your example.
If you need separate metadata for the grouping/top level, you may need to use Lookups. If I was putting together the solution, I would set up a List and a corresponding Library with a Lookup field to the List. Each of the documents uploaded to the Library would reference the List via that Lookup. To provide an interface for interacting with both within the same view, you'd need to frontend it with some custom code such as a SharePoint-Hosted App.

tag count on collection

I want to copy feature from stackexchange sites: every time you have list of questions, on the right side there is a list of all tags presented in them, including their count (frequency).
Is there any performance friendly way, how to obtain this kind of information without iteration through every element in view? Let's suppose it should work with common view data source, and content of the view can be altered by filter (keys, category) or fulltext.
I have already have considered (and refused) few solutions:
Iterate through collection - unusable for performance reasons (especially if ViewNavigator can't be used - FT query).
Counting tags in rendered content - limited to visible page only, tags for other pages are not counted (stackexchange counts tags for every page). Good performance though.
DocumentCollection.intersect - iteration through all tags and intersecting collections of all documents with that tag against source collection would result in count of documents with such tag. This approach is performance killer.
You could use a categorized view with a summary column and query it in json. Needs to be collapsed. ?ReadViewEntries&Outputformat=json
I would consider two basic approaches:
Store the tags in a multi-value summary text field in your question documents, create a categorized view based on that field, open the view, create a NotesViewNavigator, use CreateViewNavFromCategory to create a NotesViewNavigator that only contains the documents that match the tag, and get the NotesViewNavigator.count() property value.
Store the tags in a field (it can be multi-valued or single-valued, summary or non-summary text or even a rich text field) in your question documents, full text index the database, and use the Database.FTSearch method with a search formula that uses the FIELD keyword to get a NotesDocumentCollection, and use the NotesDocumentCollection.count() property.
For filtering, I think the latter approach may be better. You might be able to just revise your FT query to include additional conditions to accomplish the filtering. This could be very flexible, and should be pretty fast. With NotesViewNavigator, on the other hand, you would have to iterate through the NotesViewEntry objects in order to do the filtering.

Use list filter value when adding new items to list

In a webpart page I got a list that is filtered on a value given from another webpart.
When adding an item to that list (from this webpart page); is there a way to preset the column the list is filtered on to be the same as the filter value?
Thanks.
Ivar
this link describes how to pre-fill field based on a query string variable. It can be useful for you, and if you add some modification to this solution your problem should be solved. The thing is that when you come to the part where you create the parameter for the "New item form" web part, you'll not specify to be a query string parameter. Instead it should be of type "None", and after that when you make the connections between the webparts you'll connect them in a way that they pass parameters to each other, not filters. I had some similar problem recently and made it work out in this way.

SharePoint list based on another SharePoint list

I have a list in SharePoint that contains several fields. I need to do some calculations on this list (filter and count) and display the results on a different page. We are currently using SharePoint 2007.
I can't get what I need by creating a view from the list. I need to create a new list based on the first list to get the proper level of filtering.
The result I am trying to get from this view needs to be displayed on a separate page.
Since you edited with "I need to create a new list based off the first list to get the proper level of filtering" I would suggest writing a console app with some CAML to query exactly what you need and then dump that into a new list.
However, it sounds like you could be using some calculated columns and then do what Moo suggested.
I think some more details about the question would help you get a better answer.
In the list settings, you can add filters and counts/totals/sums to the view.

Resources