Hi,
I have a situation whereby someone is using Folders within Folders in a document library (Don't Ask!). The folders themselves have metadata against them. I want to be able to perform a REST query to get certain folders inside the folder which have a particular metadata value. I have tried all sorts of queries but the filter either doesn't do anything or it comes back saying the Field or Property doesn't exist. I am at the point of pulling my hair out. I have put below an example and also some example queries I have tried.
The metadata field is a Yes/No checkbox called Active which i believe you query against using 1 for True and 0 for False.
Library
Folder1
Sub Folder1 (Active: Yes)
Sub Folder2 (Active: No)
Folder2
I want to return the Sub folders in Folder1 whereby Active is equal to Yes. Some of my attempts below:-
/sites/Site1/_api/web/lists/Getbytitle('Library')/rootfolder/Folders('Folder1')/Folders?$select=Properties/Active&$expand=Properties&$filter=Properties/Active eq 1
/sites/Site1/_api/web/lists/Getbytitle('Library')/rootfolder/Folders('Folder1')/Folders?$select=Properties/Active&$expand=Properties&$filter=Properties/Active eq true
/sites/Site1/_api/web/GetFolderByServerRelativeUrl('Library/Folder1')/folders?$select=Properties/Active&$expand=Properties&$filter=Properties/Active eq 1
/sites/Site1/_api/web/GetFolderByServerRelativeUrl('Library/Folder1')/folders?$select=Properties/Active&$expand=Properties&$filter=(Properties/Active eq 1)
Any guidance is greatly appreciated.
Thanks