SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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??
share|improve this question
up vote 1 down vote accepted

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

<IsNull><FieldRef Name='Company'/></IsNull>
share|improve this answer
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 '13 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 '13 at 11:04
That's nice. You should just ask a new question next time, so other people can find it :) – Anders Aune Mar 8 '13 at 9:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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