简体   繁体   English

如何为searchFolders()函数正确使用Google App Script“非”查询运算符

[英]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.

相关问题 如何在正则表达式中正确使用“或”运算符? - How to use 'or' operator in regex properly? 如何在 Next.js 中正确使用 Google Tag 脚本? - How to properly use Google Tag script in Next.js? 如何在Google脚本中使用.getLastRow()函数 - How to use the function .getLastRow() in google script 如何在谷歌应用脚本上使用 NumberFormat function - How use a NumberFormat function on google apps script 如何在Google App脚本函数中使用多个参数,以及如何在HTMLService中选中哪个单选框? - How to use multiple arguments in Google App Script function and check what radio box is checked across HTMLService? 如何使用Pagetoken Google App脚本 - how to use pagetoken google app script 有什么方法可以在 Google App Script 中使用 python function 吗? - Is there any way to use python function in Google App Script? 如何在谷歌网站中使用谷歌脚本 web 应用程序和多个页面? - How to use google script web app with multiple pages in google site? 如何在 google-apps-script Web 应用程序的 for-loop 函数中将 async/await 与 FileReader 一起使用? - How to use async/await with FileReader in for-loop function in google-apps-script web app? Function“长度”在谷歌应用脚本中无法正常工作 - Function "length" not working properly in google apps script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM