You can use CAML Queries to filter your SharePoint lists or document libraries to limit the results you want to return.
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.
Enter your chosen query into the field and click OK to save.
Previewing the data will return the results of the Query
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
For this example we have a root folder of
/Test/ a list folder of
PictureTest, and a sub-folder of
To return single values you can use:
<Where> <Eq> <FieldRef Name="FileRef" /> <Value Type="Url">/Test/PictureTest/Folder1/delete-file-foreach.png</Value> </Eq> </Where>
To return multiple values, you can use:
<Where> <In> <FieldRef Name="FileRef" /> <Values> <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> </Values> </In> </Where>
For more information on CAML Queries please see the Microsoft page here: https://docs.microsoft.com/en-us/sharepoint/dev/schema/where-element-query .