更好的解决方案是解析文档库,使其不超过列表视图阈值 . 假设您在帖子中标记了它之后运行了2013,您可以让工作流对目标库执行REST API调用并检查项目计数 . 如果返回> 5000,则提醒文档库管理器存档一些旧文件 - 或使用If / Then块将文件保存到备用库 .
SPD工作流程执行此操作:
Build {...} Dictionary (Output to Variable: requestHeaders)
then Call [site url]/_api/web/Lists/GetByTitle('[Library Name to Query]') HTTP web service with request (ResponseContent to Variable: responseContent|ResponseHeaders to Variable: responseHeaders|ResponseStatusCode to Variable: responseCode)
then Get d/ItemCount from Variable: responseContent (Output to Variable: count)
If Variable: count is less than 5000
[Proceed as normal]
If Variable: count is greater than or equal to 5000
[Save to secondary library and notify admin to do some cleanup]