Get Items by Query

I am using the Get Items by Query action on 3 lists in 3 separate sub-sites. 2 are working fine but the 3rd returns “Garbage”.


I have tried returning different fields and all come back with the same “garbage”. The returned value looks like a small rectangle.


Has anyone sen anything like this before? Any help would be greatly appreciated.

Hi @jlavia,

I always type out my CAML into an application that will format and have syntax highlighting (such as Notepad++). I copied out your CAML and it seems you have terminated the FieldRef tag before the Value rather than wrapping the value in the FieldRef tag. Here’s your CAML;

<View Scope="RecursiveAll">
  <Query>
    <Where>
      <And>
        <Eq>
          <FieldRef Name="Title" />
            <Value Type="Text">[%Current Item:Work Order%]</Value>
        </Eq>
        <Eq>
          <FieldRef Name="Selected_For_Purchase" />
            <Value Type="Boolean">1</Value>
        </Eq>
      </And>
    </Where>
  </Query>
  <ViewFields>
    <FieldRef Name="ID" />
  </ViewFields>
</View>

I think it should probably look more like this:

<View Scope="RecursiveAll">
  <Query>
    <Where>
      <And>
        <Eq>
          <FieldRef Name="Title">
            <Value Type="Text">[%Current Item:Work Order%]</Value>
          </FieldRef>
        </Eq>
        <Eq>
          <FieldRef Name="Selected_For_Purchase">
            <Value Type="Boolean">1</Value>
          </FieldRef>
        </Eq>
      </And>
    </Where>
  </Query>
  <ViewFields>
    <FieldRef Name="ID" />
  </ViewFields>
</View>

Hope that helps.

That was a big help! Thanks a bunch!