Need To Check For Login Username And Password, And Then Bring Data From Previous Entries
Following this question I had asked previously (Need to Query Google Sheet for specific data from Google Apps Script). I have created a web app to track the working hours of employ
Solution 1:
I believe your goal as follows.
- You want to search the inputted values of
Name
andPassword
fromDataBase
sheet in the Spreadsheet. - You want to show the last timestamp retrieved from
ReceivedData
sheet by searching the inputted values fromDataBase
sheet.
In this case, I would like to propose to modify var obj = {checkuser: checkuser ? 'TRUE' : 'FALSE'};
of the function checklogin
for achieving your goal as follows.
From:
var obj = {checkuser: checkuser ? 'TRUE' : 'FALSE'};
To:
var obj = {checkuser: checkuser && checkuser.offset(0, 1).getValue() == Password ? 'TRUE' : 'FALSE'};
- In this modification, the inputted
Name
value is searched from the 1st column, and then,Password
is checked from the 2nd column with the same row of the searched 1st column. And, when the both values are same,TRUE
is returned.
Post a Comment for "Need To Check For Login Username And Password, And Then Bring Data From Previous Entries"