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
NameandPasswordfromDataBasesheet in the Spreadsheet. - You want to show the last timestamp retrieved from
ReceivedDatasheet by searching the inputted values fromDataBasesheet.
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
Namevalue is searched from the 1st column, and then,Passwordis checked from the 2nd column with the same row of the searched 1st column. And, when the both values are same,TRUEis returned.
Post a Comment for "Need To Check For Login Username And Password, And Then Bring Data From Previous Entries"