Verified
Status Update
Comments
da...@google.com <da...@google.com> #2
would be useful!
ka...@gmail.com <ka...@gmail.com> #3
much needed
da...@google.com <da...@google.com> #4
I need to monitor active sheet because I have different side bar for every sheet. What I'm doing now is running a JavaScript from the client side every 1s (second) to call google.script.run.monitorTabChange();. This function reads current active sheet's name and compares it with a sheet name that had been saved in a PropertyService during the last call of google.script.run.monitorTabChange();.
The spreadsheet with this script helps me with creating Purchase Orders. It pulls data from Salesforce and Quickbooks and generates a PO. So for every PO for every customer I am duplicating the spreadsheet and of course the script. The problem that I am facing is running out of quota. I have generated tons of POs already and each of them runs (even if the spreadsheet is not opened - I tested it) the 'monitorTabChange' function, which calls PropertyService. I have 100 000 quota for PropertyService calls. And I'm running out of it pretty quickly now.
The trigger 'OnSheetChange' would then save me (probably many others too) from this issue. At the same time it would saved Google tons of execution overhead (that could be significant if lots of people use the solution I do to track the sheet change).
Thanks!
The spreadsheet with this script helps me with creating Purchase Orders. It pulls data from Salesforce and Quickbooks and generates a PO. So for every PO for every customer I am duplicating the spreadsheet and of course the script. The problem that I am facing is running out of quota. I have generated tons of POs already and each of them runs (even if the spreadsheet is not opened - I tested it) the 'monitorTabChange' function, which calls PropertyService. I have 100 000 quota for PropertyService calls. And I'm running out of it pretty quickly now.
The trigger 'OnSheetChange' would then save me (probably many others too) from this issue. At the same time it would saved Google tons of execution overhead (that could be significant if lots of people use the solution I do to track the sheet change).
Thanks!
ka...@gmail.com <ka...@gmail.com> #5
will really appreciate this feature :)
Description
Using projects.create of Google Apps Script API, a bound script cannot be created. The API can create a bound script in Spreadsheet, Document and Form.
- A small code sample that reliably reproduces the issue. The sample should run as-is or with minimal setup, without external dependencies.
I have confirmed that this sample script can create the bound script in Spreadsheet, Document and Form. This cannot create it in only Slides.
The manually created bound script in Slides can be downloaded and updated. It cannot do only creating bound script.
# Sample script: This sample script creates a bound script in Google Docs.
function createProject() {
var parentId = "### fileId of Slides ###";
var res = UrlFetchApp.fetch("
method: "post",
contentType: 'application/json',
headers: {"Authorization": "Bearer " + ScriptApp.getOAuthToken()},
muteHttpExceptions: true,
payload: JSON.stringify({"title": "sampleProject", "parentId": parentId})
});
Logger.log(res)
}
# Response
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}
# appsscript.json
{
"timeZone": "Asia/Tokyo",
"dependencies": {
},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": [
"
"
]
}
In order to use above sample script, I enabled Google Apps Script API v1. And I added 2 scopes to appsscript.json (Manifests). In this installation, I have confirmed that bound script and standalone script can be created, updated and downloaded using Google Apps Script API v1. For only Slides, the bound script cannot be created. I thought that this is a bug. So I would like to report.
## Reference :