CAML Query Filtering

You can use CAML Queries to filter your SharePoint lists or document libraries to limit the results you want to return.

How to Use

To input your CAML Query connect to your target list or document library. Now find the ListViewCAMLQuery property in the connection property window and click on the ellipsis (...) to open the editor.

Open Query Editor

Enter your chosen query into the field and click OK to save.

CAML Query

Previewing the data will return the results of the Query

Query Results

Query Examples

When referencing the item you wish to query you need to include the Root Folder, the List Folder and any sub folders you have within your library separated by a /.

In our examples below we are connected to a Picture Library and wish to return only one specific image. The root folder and list folder can be gathered from the connection properties around the ListViewCAMLQuery box.

List and Root Folders

For this example we have a root folder of /Test/ a list folder of PictureTest, and a sub-folder of Folder1.

To return single values you can use:

    <FieldRef Name="FileRef" />
    <Value Type="Url">/Test/PictureTest/Folder1/delete-file-foreach.png</Value>

To return multiple values, you can use:

    <FieldRef Name="FileRef" />
      <Value Type="Url">/Test/PictureTest/Folder1/delete-file-foreach.png</Value>
      <Value Type="Url">/Test/PictureTest/Folder2/delete-file-foreach.png</Value>
      <Value Type="Url">/Test/PictureTest/Folder2/delete-file.png</Value>

For more information on CAML Queries please see the Microsoft page here: .