[英]How to properly use Google App Script “not” query operator for searchFolders() function
I am trying to to search through a shared drive for KPI reports that do not contain "Archived" in the name. 我正在尝试通过共享驱动器搜索名称中不包含“已存档”的KPI报告。 But Im getting "Invalid argument: q" error 但我收到“无效参数:q”错误
I have tried using "not title contains 'Archived'" and "title not contains 'Archived'" 我尝试使用“标题不包含“已存档””和“标题不包含“已存档””
var clientFolder = DriveApp.searchFiles("title contains 'KPI Report' and mimeType = 'application/vnd.google-apps.spreadsheet' and modifiedDate >= '" + dateModified + "' not title contains 'Archived'");
Simply had to put "and" before "not title"! 只需将“和”放在“非标题”之前! Credit to @Chris G.! 归功于@Chris G.!
var clientFolder = DriveApp.searchFiles("title contains 'KPI Report' and mimeType = 'application/vnd.google-apps.spreadsheet' and modifiedDate >= '" + dateModified + "' and not title contains 'Archived'");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.