You're kind of on the right track potter but with a few problems. The first being that your function is named FindCell (with upper case F) and it calls a very similarly named function findCell (with lower case f) that isn't shown anywhere.
The script supplied doesn't show how you are getting the asset tags to work with. You probably have some function that gets it and declares the input as a variable. You need to pass that variable to the function that searches for a match. Your function above would not actually search for anything.
This is what I would do ( with commented statements to explain what's going on):
function getScannedInput() { /*I'm simulating the function you probably have which gets the scanned input
You'll have your script to get the input here*/
var scannedInput = 1002001 //I hardcoded the number you gave just for example
var myInfo = FindCell(scannedInput); // You need to pass the value of the scanned input to the function
//returns this 2D array [[StudentName, userName, SN, cellAddress]]
var StudentName = myInfo[0][0];
var userName = myInfo[0][1];
var SN = myInfo[0][2];
var cellAddress = myInfo[0][3]; //You may not need this now.
/*Bear in mind that if you still need to use the cellAddress you'll need to
set variables for the ss and sheet in this function too.*/
// * Now do stuff with StudentName, userName & SN *
}
function FindCell(scannedInput) { // You need to pass the value of the scanned input to the function
var ss = SpreadsheetApp.openById("1W3hkCk8foL7fQtmVkcU4ZP4eTbHT696cacR6a-sSeDY");
var sheet = ss.getActiveSheet();
var range = sheet.getDataRange();
var values = range.getValues();
var myInfo = []; //Create an empty array to put your info in when found
var found = false;
for (var i=0; i<values.length; ++i) { // Loops through each row
for (var j=0; j<values[i].length; ++j) { // Loops through each column
if (values[i][j] == scannedInput) { // Checks for match to scannedInput
myInfo.push(values[i][0]);//Adds StudentName to the array
myInfo.push(values[i][1]);//Add username to the array
myInfo.push(values[i][3]);//Adds SN to the array
myInfo.push(sheet.getRange(i, j).getA1Notation()); /*If you still need to return the cell address -
Do you still need to? (I think probably not.) Delete if you don't*/
found = true;
break; // Breaks out of the j loop
}
}
if (found) {
break; // Breaks out of the i loop if found is true i.e. scannedInput was found
}
}
return [myInfo]; /*returns this array [StudentName, userName, SN, cellAddress]
or [StudentName, userName, SN] if you didn't need cellAddress above.*/
}
Editted after OP pointed out that myInfo returns 2D array. Here's a link to a sample sheet used in above code.