One last question (I hope)...
What is the correct way to return a variable from the function I am calling back to the doGet(e) function? In this case I want to use the value of the count variable from the IncrementCounter function, in the .createTextOutput return (eg: “I got your counter request and the count is now "+count)
// MY CURRENT CODE
function doGet(e) {
var passedString,whatToReturn;
passedString = e.parameter.searchStringName;
if (passedString === 'IncrementCounter') {
whatToReturn = IncrementCounter(); //Run function IncrementCounter
};
//return ContentService.createTextOutput(whatToReturn);
//return ContentService.createTextOutput("I got your counter request and the count is now "+count);
return ContentService.createTextOutput("I got your request and updated the counter");
};
function IncrementCounter(){
var ss = SpreadsheetApp.openById([my spreadsheet ID]);