小编Obl*_*lla的帖子

变量返回undefined

我收到了名为的变量的未定义:名称有关为什么它不显示结果的任何帮助.在按下搜索后,它将显示在记录器中,但不会显示在index.html或Web端.

码:

// var names =[]; //I tried using a global variable but with no luck

function SearchFiles(searchTerm) {
  var searchFor = "title contains '" + searchTerm + "'";
  var owneris = "and 'Email@email.com' in Owners";

  var names = [];
  var fileIds = [];
  Logger.log(searchFor + " " + owneris);
  var files = DriveApp.searchFiles(searchFor + " " + owneris);
  while (files.hasNext()) {
    var file = files.next();
    var fileId = file.getId(); // To get FileId of the file
    fileIds.push(fileId);
    var name …
Run Code Online (Sandbox Code Playgroud)

javascript gwt google-apps-script

5
推荐指数
1
解决办法
1142
查看次数

标签 统计

google-apps-script ×1

gwt ×1

javascript ×1