admin管理员组

文章数量:1023794

I have a list that is a parent folder (Folder_A). It has multiple subfolders as list items. I'm interested in retrieving documents inside a specific subfolder (Folder_B) based on the value of a certain custom column.

When I use the query sites/<site_id>/lists/<list_id>/items?$expand=fields&$filter=fields/Sent eq null, it gives me results from all the subfolders (as expected). In addition to this filter, I tried adding a parentReference/Id eq 'xxxxxxx' filter to try to get items that have Folder_B as parent, but that query returns a "General exception while processing" error.

Am I missing something, or is there any other option?

I have a list that is a parent folder (Folder_A). It has multiple subfolders as list items. I'm interested in retrieving documents inside a specific subfolder (Folder_B) based on the value of a certain custom column.

When I use the query sites/<site_id>/lists/<list_id>/items?$expand=fields&$filter=fields/Sent eq null, it gives me results from all the subfolders (as expected). In addition to this filter, I tried adding a parentReference/Id eq 'xxxxxxx' filter to try to get items that have Folder_B as parent, but that query returns a "General exception while processing" error.

Am I missing something, or is there any other option?

Share Improve this question edited Nov 19, 2024 at 2:53 Anirudh Sundaram asked Nov 19, 2024 at 2:51 Anirudh SundaramAnirudh Sundaram 12 bronze badges 1
  • I found a way to search inside a specific folder - sites/<site_id>/drives/b!<drive_id>/items/<folder_b_id>/search(q=''), but I can't figure out how to generate a query string for a custom column. – Anirudh Sundaram Commented Nov 19, 2024 at 16:35
Add a comment  | 

1 Answer 1

Reset to default 0

Currently there is no such api to filter by subfolder. You could get the items by id of subfolder.

GET https://graph.microsoft/v1.0/groups/{group-id}/drive/items/{next-item-id}/children

I have a list that is a parent folder (Folder_A). It has multiple subfolders as list items. I'm interested in retrieving documents inside a specific subfolder (Folder_B) based on the value of a certain custom column.

When I use the query sites/<site_id>/lists/<list_id>/items?$expand=fields&$filter=fields/Sent eq null, it gives me results from all the subfolders (as expected). In addition to this filter, I tried adding a parentReference/Id eq 'xxxxxxx' filter to try to get items that have Folder_B as parent, but that query returns a "General exception while processing" error.

Am I missing something, or is there any other option?

I have a list that is a parent folder (Folder_A). It has multiple subfolders as list items. I'm interested in retrieving documents inside a specific subfolder (Folder_B) based on the value of a certain custom column.

When I use the query sites/<site_id>/lists/<list_id>/items?$expand=fields&$filter=fields/Sent eq null, it gives me results from all the subfolders (as expected). In addition to this filter, I tried adding a parentReference/Id eq 'xxxxxxx' filter to try to get items that have Folder_B as parent, but that query returns a "General exception while processing" error.

Am I missing something, or is there any other option?

Share Improve this question edited Nov 19, 2024 at 2:53 Anirudh Sundaram asked Nov 19, 2024 at 2:51 Anirudh SundaramAnirudh Sundaram 12 bronze badges 1
  • I found a way to search inside a specific folder - sites/<site_id>/drives/b!<drive_id>/items/<folder_b_id>/search(q=''), but I can't figure out how to generate a query string for a custom column. – Anirudh Sundaram Commented Nov 19, 2024 at 16:35
Add a comment  | 

1 Answer 1

Reset to default 0

Currently there is no such api to filter by subfolder. You could get the items by id of subfolder.

GET https://graph.microsoft/v1.0/groups/{group-id}/drive/items/{next-item-id}/children

本文标签: sharepoint onlineGraph APIList Itemfilter criteria to filter by subfolderStack Overflow