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, ';#')" />
精彩评论