Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4321418
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T08:44:37+00:00 2026-05-21T08:44:37+00:00

I am querying a sharepoint list via the web service api. Calling the service

  • 0

I am querying a sharepoint list via the web service api. Calling the service through the API requires sending an XmlNode object that represent the CAML query. With everything else exactly the same, these are two different queries I’m attempting to send (obtained via the XmlNode‘s InnerXml property right before they are sent to the API):

<!-- This one works fine -->
<Query>
    <Where>
        <Eq>
            <FieldRef Name="ID" /> 
            <Value Type="Text">304</Value> 
        </Eq>
    </Where>
</Query>

<!-- This one fails with a Soap exception (which I've seen before when searching
     for an invalid field, but the first one calls the exact same field). -->
<Query>
    <Where>
        <In>
            <FieldRef Name="ID" /> 
            <Values>
                <Value Type="Text">304</Value> 
                <Value Type="Text">303</Value> 
                <Value Type="Text">302</Value> 
                <Value Type="Text">301</Value> 
            </Values>
        </In>
    </Where>
</Query>

I’m new to CAML queries, so perhaps I’m missing something obvious about how In statements work, but all the examples I’ve viewed seem to have this exact format.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T08:44:38+00:00Added an answer on May 21, 2026 at 8:44 am

    Which version of SharePoint are you using ? The IN element seems to be valid only in SharePoint 2010. (According to this article: http://www.lushpedia.com/post/Alternative-of-In-Clause-for-CAML-Query-for-SharePoint-2007.aspx)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am querying a sharepoint list like <where><Field Ref Name='Title'/><Value type='Text'>A</value></where> now I am
I am querying the Microsoft Office SharePoint Server Search Service to write some results
I am querying the Microsoft Office SharePoint Server Search Service to write some results
I am querying data from views that are subject to change. I need to
I am querying information from Active Directory . I have code that works, but
I am constructing an asp.net tree view by querying sharepoint user profiles. The accountname
I'm querying Sharepoint server-side and getting back results as Xml. I want to slim
When querying for large ammount of data through WMI (say the windows events log
I'm querying a mysql table which then loops through the results. One of the
There is a method that returns 2D array, this method querying a dictionary from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.