Answer the question
In order to leave comments, you need to log in
Why doesn't google script work when I log in from another device?
function onEdit(e)
{
var range = e.range
if(range.getColumn()==1 && e.value!=null){
range.offset(0,1).setValue(new Date())
}
}
Answer the question
In order to leave comments, you need to log in
And the input to the onEdit function at the program level is carried out? Add a line to onEdit
and see what happens when another person edits the table.
It is also possible that you did not specify the necessary user rights during deployment.
console.log('Что-то там');
The simple onEdit trigger has a number of limitations . Check if you fall under them.
Unlikely, but you can also try adding this code to force the authorization scope to only access the current spreadsheet, and not all spreadsheets:
/**
* @OnlyCurrentDoc
*/
Thank you all for your help. The reason why the script didn't work was because the second column, which should have been filled in automatically, was protected from changes. When I granted access, everything worked.
But now I have another question, is it possible to do this so that the column is protected from changes by users, but the data is entered according to the script automatically when the first column is filled in? This is necessary so that other users do not violate anything or accidentally delete the data that it automatically adds.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question