if (e.parameter.func == "Search"){
var ss = SpreadsheetApp.openById(e.parameter.ID);
var sh = ss.getSheetByName(e.parameter.SH);
var tracer = e.parameter.tracer;
var email = e.parameter.email;
var rgs = sh.getName() + "!" + sh.getDataRange().getA1Notation();
var sqls = '"Select A,B,C,D,E where E =\''+tracer+ '\'"';
( ------------
this part I can't display the result which giving me a hard time. question for help
-
in the google sheet column row 1, column 5 is = 2222
-
how to query the code in the 1,5?
-
is this a correct query? var sqls = '"Select A,B,C,D,E where E =''+tracer+ ''"';
---------------- )var qrys = '=IFERROR(query(' + rgs + ',' + sqls + '),"")';
var ts = ss.insertSheet();
var setQuery = ts.getRange(1,1).setFormula(qrys);
var getResult = ts.getDataRange().getValues();var getFullNameSearch = ts.getRange(1,1).getValues();
var getEmail = ts.getRange(1, 2).getValues();
var getPWD = ts.getRange(1,3).getValues();
var traceIDnumSearch = ts.getRange(1,5).getValues();
ss.deleteSheet(ts);
if (getResult!=""){
if (traceIDnumSearch==tracer){return ContentService.createTextOutput(getFullNameSearch);}
else {return ContentService.createTextOutput("ENTRY");}
} else {return ContentService.createTextOutput(getResult);}
}