开发者

Can the ID from a referenced column be obtained when using SharePoint's Data View Part?

I have a Data View Part pulling from a list that has a lookup column to another list (title linked by ID)

And somewhere in the XSLT of the data view web part configurati开发者_运维知识库on, it reads

<xsl:value-of select="@ColumnX"/>

Now since ColumnX is a reference to another list (linked to item), how do I go about obtaining the ID rather than the text? Is there a ddwrt trick out there?


The value of a Lookup Field is in the format of "ID;#Text". To get the ID value, we use is regular xslt:

<xsl:value-of select="substring-before(@ColumnX, ';#')" />
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜