tags:

views:

13

answers:

1

Hi,

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

A: 

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>
Estyn
Sharepoint Document library stores only used categories. I would like to show all the categories from the CAtegories list and documents from document library matching with the category. So in my out put i should show the categories without documents also. Please let me know if I am not clear.