开发者

Performing join between document library and list

I have a document l开发者_StackOverflow中文版ibrary 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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜