Question

My SharePoint 2010 CAML Query is not returning the expected results. It is returning nothing. What am I doing wrong?

<View>
    <Query>
        <Where>
          <In>
            <FieldRef ID="1d8376f2-5ac6-407f-9652-a74405a87846" Name="Bank_x0020_Choice" />
            <Values>
                <Value Type="Choice">Retail</Value>
                <Value Type="Choice">Commercial</Value>
            </Values>
          </In>
       </Where>
     </Query>
     <ViewFields>
         <FieldRef ID="1d22ea11-1e32-424e-89ab-9fedbadb6ce1" Name="ID" />
         <FieldRef ID="fa564e0f-0c70-4ab9-b863-0177e6ddd247" Name="Title" />
         <FieldRef ID="1d8376f2-5ac6-407f-9652-a74405a87846" Name="Bank_x0020_Choice" />
         <FieldRef ID="224ba411-da77-4050-b0eb-62d422f13d3e" Name="LinkFilename2" />
      </ViewFields>
     <RowLimit Paged="TRUE">1000</RowLimit>
</View>
Était-ce utile?

La solution

Try to use the tool CAML Builder. With this tool you can check your CAML queries with no pre-configuration and no coding. There you can test your query, maybe there is simply an spelling error in your fieldrefs, values or names.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top