Answer the question
In order to leave comments, you need to log in
Service invoked too many times in a short time: exec qps. How to fix?
Hello! The question is this:
A friend asked me to help him with a Google spreadsheet, the task was as follows: When inserting a value into a cell, the current cell filling time will be calculated in the neighboring cell, and depending on whether the cell fell into the desired range, it would be tinted either green or red. It’s clear about the colors, they made it the standard means of Google tables.
In the place where the time should be calculated is the formula =GETDATE(A3), which I described in the Script Editor
function GETDATE(input) {
if (input)
return Utilities.formatDate(new Date(), "GMT+03:00", "HH:mm:ss");
else
return '';
};
Answer the question
In order to leave comments, you need to log in
The main thing that can be done from a simple one is instead of 50 calls, make one call per range.
function GETDATE(input) {
if (input) {
if (typeof input.map === "function") return input.map(GETDATE);
return Utilities.formatDate(new Date(), "GMT+03:00", "HH:mm:ss");
} else
return '';
};
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question