function doGet(e) {
var message = "";
var ss = SpreadsheetApp.openById(e.parameter.sheetId);
var sh = ss.getSheetByName(e.parameter.gridName);
var rg = sh.getName() + "!" + sh.getDataRange().getA1Notation();
var sql = e.parameter.query;
var qry = '=query(' + rg + ',\"' + sql + '\",0)';
var ts = ss.insertSheet();
var setQuery = ts.getRange(1,1).setFormula(qry);
var getResult = ts.getDataRange().getValues();
ss.deleteSheet(ts);
if (getResult[0][0] == "#N/A") {
message = 'username not present';
} else {
if (getResult[0][1] != e.parameter.pwd) {
message = 'incorrect password';
} else {
message = 'signed in'+getResult[0][2];
}
}
return ContentService.createTextOutput(message);
}
so if first button click then send the value of get result{0{{2) but if secodn button presss then it decuts the value in textbox of app in google sheet username