Hey,
I am trying to get data from google sheets just after login. my sheet is this way column A has user name column B has password and column C has a unique id which will be used in a different screen for Arduino use. I I just need help to get back the unique id for a specific username and password.
my google script code is :
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);
thanks TIMAI2 these are not passwords set by the user this password is set by me to give the users a limited time access. how can I return the data back to the App and what changes do I have to make in the app
The name Tim must be 'Tim'
You have forget to add that symbol in prefix and suffix. No need to add such symbol for numbers but for text it must be 'sjshsh'