locked
How to check all items are not null in CAML Query? RRS feed

  • Question

  • HI All,

    In a CAML Query, i got three items. In all three items, a particular column(Closure Date) should not be null. How to check in all three items, where 'Closure date' is not null?

    Thanks in advance!

    Wednesday, October 1, 2014 10:29 AM

Answers

  • Hi,

    Try this:

    "<Where><IsNull><FieldRef Name='Closure Date' /></IsNull></Where>"

    Hope it hepls!

    Thanks,

    Avni Bhatt


    If this helped you resolve your issue, please mark it Answered

    Wednesday, October 1, 2014 10:36 AM
  • Hi Sam Tim,

    You can use the IsNotNull for that

    <IsNotNull><FieldRef Name='DateField' /></IsNotNull> 

    Hope this helps


    • Edited by Toon S Wednesday, October 1, 2014 10:37 AM
    • Marked as answer by Patrick_Liang Monday, October 13, 2014 8:44 AM
    Wednesday, October 1, 2014 10:36 AM

All replies

  • Hi,

    Try this:

    "<Where><IsNull><FieldRef Name='Closure Date' /></IsNull></Where>"

    Hope it hepls!

    Thanks,

    Avni Bhatt


    If this helped you resolve your issue, please mark it Answered

    Wednesday, October 1, 2014 10:36 AM
  • Hi Sam Tim,

    You can use the IsNotNull for that

    <IsNotNull><FieldRef Name='DateField' /></IsNotNull> 

    Hope this helps


    • Edited by Toon S Wednesday, October 1, 2014 10:37 AM
    • Marked as answer by Patrick_Liang Monday, October 13, 2014 8:44 AM
    Wednesday, October 1, 2014 10:36 AM