I'm having this weird problem with my app script. I have two functions, one that processes text to remove line breaks and one that removes multiple spaces. When I manually run the two functions one after the other, the line break is removed and any multiple spaces are then removed where the line break was. But when I make a function like the following, the second function does not have any effect:
function bothTest() {
cleanText();
removeMultipleSpaces();
}
Surely this just runs the functions one after the other just as if I ran then manually. Why does it not have the same effect?
Logger.log()then ctrl+enter to view the log. Are your functions doing anything asynchronously?Utilities.sleep(1000);between function calls may help.