I makemade a Google Apps Script, but often I get this error: Script invoked too many times per second in this Google user account.
This is the script:
function papersControl(tipo, col, prev_cell, quant) {
var cell = 0;
var gender = tipo.split(" ");
if (tipo == col) {
cell = parseInt(prev_cell,10) + parseInt(quant,10);
return cell;
}
if ( (col == "Special Paper") && (gender[0] == "Certificate") && (gender[2] != "Voucher") ) {
cell = parseInt(prev_cell,10) + parseInt(quant,10);
return cell;
}
if ( (col == "Special Paper 2") && (gender[0] == "Certificate") && (gender[2] == "Vouncher") ) {
cell = parseInt(prev_cell,10) + parseInt(quant,10);
return cell;
}
else
return prev_cell;
}
I'd like to freeze the past recorded values in a cell in order to reduce the number of "times per second" that the script invokes Google servers, freezing these old values whichsince I don't need have computedto compute anymore. How can I do this?