I have the following code in XSLT and I get the Id of "Evaluacion" lookup field with @EvaluacionIDLookup. I need to get the name of "Evaluacion" but the internal name is "EvalCompeEvaluacion" and if I set @EvalCompeEvaluacion intead I get a strange code.

</td><td class="ms-vb styleLine">
                <xsl:value-of select="@EmpleadoCargoLookup" /></td><td class="ms-vb styleLine" style="text-align:center; width: 90px;height:22px;">
                    <xsl:when test="@RespuestaJSON != ''">
                            <xsl:attribute name="href">
                            <xsl:attribute name="onclick">
                                <xsl:value-of select="translate(translate(@EmpleadoCedulaLookup,'.',''),',','')"/>,
                                <xsl:value-of select="translate(translate(@EvaluacionIDLookup,'.',''),',','')"/>
                                <xsl:text>);return false;</xsl:text>                        
                            <img src='/_layouts/images/DATASET_SP16.gif' alt='Ver reporte de evaluación' style="border-style: none"/>

enter image description here

1 Answer 1


As lookup column/field is stored as id value pair in sharepoint so you could try to use

<xsl:value-of select="@LookUpField" disable-output-escaping="yes"/>

It is worth trying although using a combination of substring-before and substring-after function like this.First step is to remove the hyperlink around the Lookup column then extract values from there-

<xsl:value-of select="substring-before("&le;/a&gt;", substring-after("*&quot;&gt;", @LookUpField))" disable-output-escaping="yes"/>
  • I try with EvalCompeEvaluacion but It does not work Dec 14, 2015 at 15:52
  • what is your actual lookup column name?
    – user13408
    Dec 14, 2015 at 15:55
  • It is the first in the image. Display name "Evaluación" and the internal name is "EvalCompeEvaluacion" but if I put @EvalCompeEvaluacion It does not work Dec 14, 2015 at 15:59
  • In the code that I posted I have @EvaluacionIDLookup that is the las field in the image but I need "Evaluación" Dec 14, 2015 at 16:04
  • Tried <xsl:value-of select="@Evaluación" disable-output-escaping="yes"/> ?? Also now I suspect ó character.
    – user13408
    Dec 14, 2015 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.