Уважаемые, у меня есть форма, которая делает папку вывода ответа " MURAD " Я хочу изменить это MURAD на 'rowContents
'
где
var rowContents=sheet.getRange(lastRow,1,1,sheet.getLastColumn()).getValues()
;
скрипт
function myFunction() {
var ss=SpreadsheetApp.getActiveSpreadsheet();
var sheet=ss.getActiveSheet();
var lastRow=ss.getLastRow();
//the first column contains the timestamp
var department=sheet.getRange(lastRow,2).getValue();
//----------------------------------------------------------------------
var subjectCode=sheet.getRange(lastRow,3).getValue();
var courseCode=sheet.getRange(lastRow,4).getValue();
var courseNo=sheet.getRange(lastRow,5).getValue();
//var newResponse=subjectCode.toString()+"-"+courseCode.toString()+"-"+courseNo.toString();
//here the new column with the file name is going on
var newResponse=courseCode.toString()+courseNo.toString();
//-----------------------------------------------------------------------
sheet.getRange(lastRow,7).setValue(newResponse);
var secodarySheetId;
switch(department) {
case "Physics":
secodarySheetId="1k2rOZfXjXHciPQh1pXn7-GP-p3rccMgT";//Paste here the Id of the destinationsheet in the Physics folder
break;
case "Chemistry":
secodarySheetId="16-TOKctf8Y7nHyYFK8OgNIMCd9YQFvRT";//Paste here the Id of the destinationsheet in the Chemistry folder
break;
case "Math":
secodarySheetId="1aPXI357UfQGdJnoxYfvtSq7GXhfizSSC";//Paste here the Id of the destinationsheet in the Maths folder
break;
}
// var files=DriveApp.getFolderById(secodarySheetId).getFiles();
//while(files.hasNext())
//{
// Logger.log(files.next())
//}
//DriveApp.createFolder(secodarySheetId)
var rowContents=sheet.getRange(lastRow,1,1,sheet.getLastColumn()).getValues();
var folders = DriveApp.getRootFolder().searchFolders('AlulaCR');
while (folders.hasNext()) {
var folder = folders.next();
Logger.log(folder.getName());
}}