I have a contact list with a company lookup field and I need to retrieve those without any company associated

so I was thinking can I put it like this:

        <FieldRef Name="Title"></FieldRef>
          <FieldRef Name="Company" />
          <Value Type="Lookup"></Value> //or should I put null since it's a lookup field??

1 Answer 1


If you want items with no lookup value you could use:

<IsNull><FieldRef Name='Company'/></IsNull>
  • hey I just wanted to ask if we want to check this field lookup value in XSL format this wont work <xsl:when test="Company !=null"> <xsl:value-of select="Company" /> </xsl:when> do you have any idea?
    – Glolita
    Mar 7, 2013 at 8:25
  • Just if anyone esle is asking I found it and it's like that <xsl:when test="Company !=''"> <xsl:value-of select="Company" /> </xsl:when>
    – Glolita
    Mar 7, 2013 at 11:04
  • 1
    That's nice. You should just ask a new question next time, so other people can find it :) Mar 8, 2013 at 9:38

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.