CAML Query throwing error -


pretty new caml queries, trying query list based on status = completed , date range.

it throwing following error "unexpected error: 1 or more field types not installed properly. go list settings page delete these fields. microsoft.sharepoint"

status , created both system columns, pretty sure have field names correct have tested query without date range , runs expected, think problem somewhere in between , . have read, created expects time follow date. query below, appreciated.

<where>    <and>                                   <and>           <eq><fieldref name="status" />value type="choice">completed</value></eq>     </and>                 <geq>                   <fieldref name="created" /><value includetimevalue="true"     type="datetime">2013-07-02t00:00:01z</value>   </geq>        <leq>                         <fieldref name="created" /><value includetimevalue="true"  type="datetime">2013-07-02t23:59:59z</value>        </leq> </and>  </where> 

you have basic syntax errors in query above, may causing issue. see if helps.

  • you missing left angle-bracket in first tag.
  • you had many tags , out of sequence.
  • i changed type attribute of first tag text.

    <where>    <and>         <eq><fieldref name="status" /><value type="text">completed</value></eq>      <and>                   <geq>                      <fieldref name="created" /><value includetimevalue="true" type="datetime">2013-07-02t00:00:01z</value>         </geq>         <leq>                           <fieldref name="created" /><value includetimevalue="true" type="datetime">2013-07-02t23:59:59z</value>         </leq>     </and> </and>  </where> 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -