如何在 Sharepoint REST API 查询中过滤多个值?

eri*_*ine 5 rest sharepoint

使用 REST API 调用确定 Sharepoint 列表中是否存在多个值的正确语法是什么?

例子

https://mycompany.sharepoint.com/sites/test/_api/web/lists/GetByTitle('BigLis')/items?$filter=ProjectNo eq '123', '141', '154'
Run Code Online (Sandbox Code Playgroud)

我想知道是否有记录的 ProjectNo 为 123、141 或 154。ODATA 中似乎没有“OR”运算符。

小智 7

使用下面的 REST API。

/_api/web/lists/GetByTitle('BigLis')/items?$filter=(ProjectNo eq '123' or ProjectNo eq '141' or ProjectNo eq '154')
Run Code Online (Sandbox Code Playgroud)