google-apps-script-simple-triggers

Bracketing multiple onEdit functions

橙三吉。 提交于 2020-06-27 17:02:06
问题 I have 3 onEdit app script functions in my Google Spreadsheet which work individually but I cannot work out where to put the brackets to nest them. Database They are all under function onEdit(e). I understood that you can't separate onEdit functions like you can other functions. Please tell me if I'm wrong. This is my code which is a little messy and probably needs a tidy up. // Cut Employees Left from Unit Standards sheet and paste in Unit Standards - Employees Left sheet function onEdit(e)

Google Sheets script error “Unreachable Service: mirror”

大城市里の小女人 提交于 2020-06-26 05:55:11
问题 I have a script in Google Sheets where I literally can't execute anything. For example: function onOpen(e) { var ui = SpreadsheetApp.getUi(); // Or SpreadsheetApp or FormApp. ui.createMenu("Ampion Sheet Control") .addSeparator() .addItem("Ampion Sheet Control Wizard", "showSidebarIntro") .addToUi(); } I just get the error: Unreachable Service: mirror 回答1: To make sure the question has a noticeable answer: There is an issue submitted to the issue tracker that is as of now not yet resolved (or

Google Sheets script error “Unreachable Service: mirror”

本小妞迷上赌 提交于 2020-06-26 05:54:44
问题 I have a script in Google Sheets where I literally can't execute anything. For example: function onOpen(e) { var ui = SpreadsheetApp.getUi(); // Or SpreadsheetApp or FormApp. ui.createMenu("Ampion Sheet Control") .addSeparator() .addItem("Ampion Sheet Control Wizard", "showSidebarIntro") .addToUi(); } I just get the error: Unreachable Service: mirror 回答1: To make sure the question has a noticeable answer: There is an issue submitted to the issue tracker that is as of now not yet resolved (or

Google apps javascript doesn't run for anonymous users?

不问归期 提交于 2020-06-25 06:54:43
问题 This is probably a dumb newbie question, but I have a spreadsheet that I want to make available to anonymous users by just giving them the URL. After a lot of hair-pulling I now have the cell protection rain dance figured out, but I have another problem. The original sheet's onOpen works fine for me and creates a custom menu, but when I share the sheet and open it as an anonymous user, no menu appears. Fine, thought I, it isn't the first time Google's stuff doesn't work as advertised. So then

MailApp.sendEmail Error Message - “do not have permission to call sendEmail” [duplicate]

ぃ、小莉子 提交于 2020-06-22 15:36:28
问题 This question already has an answer here : Not allowed to execute sendEmail() from custom function, but OK in script editor (1 answer) Closed 4 years ago . When I change something in my spreadsheet, the onEdit() trigger runs, and I can see all the msgbox's that I put in my code. My function stops at this line MailApp.sendEmail(emailAddress, subject, message); I never see the message 'Email sent!', and get an error in the EXECUTION TRANSCRIPT: You do not have permission to call sendEmail If I

MailApp.sendEmail Error Message - “do not have permission to call sendEmail” [duplicate]

青春壹個敷衍的年華 提交于 2020-06-22 15:34:00
问题 This question already has an answer here : Not allowed to execute sendEmail() from custom function, but OK in script editor (1 answer) Closed 4 years ago . When I change something in my spreadsheet, the onEdit() trigger runs, and I can see all the msgbox's that I put in my code. My function stops at this line MailApp.sendEmail(emailAddress, subject, message); I never see the message 'Email sent!', and get an error in the EXECUTION TRANSCRIPT: You do not have permission to call sendEmail If I

Google sheets - User/Email stamp triggered ON EDIT works only with OWNER account - how to enable user/email stamps for all editors?

空扰寡人 提交于 2020-06-01 05:38:46
问题 I need a solution to enable all editors to leave their name stamps after they make changes in a sheet. I was able to come up with script code which does work ONLY FOR OWNER. I tried to authorize the script by running the script manually from editors accounts - the app has the authorization but even though it doesn't work for Editors. Norbert Wagner: "However authorizing from the script editor did not work for me. But as soon as I added a menu in the document and executed the function from

What am I doing wrong when using onSelectionChange for [google-apps-script]

丶灬走出姿态 提交于 2020-05-23 14:15:06
问题 I found this trigger onSelectionChange(e) on developers.google.com it should set background to red if a single empty cell is selected. Im not getting that result with just copy and paste. I don't think Im missing a step any help would be appreciated. /** * The event handler triggered when the selection changes in the spreadsheet. * @param {Event} e The onSelectionChange event. */ function onSelectionChange(e) { // Set background to red if a single empty cell is selected. var range = e.range;

onEdit Event object access to previous value of a cell that has been modified?

戏子无情 提交于 2019-12-28 13:57:29
问题 I cannot find any detailled documentation on the event.source object so I would like to know if it's possible to access the previous value of the modified range so I can compare the new values of the range with the old values of the range for validation. Thanks for your help. OnEdit(event) function onEdit(event) /* Default onEdit Event function */ { var ssa = SpreadsheetApp.getActiveSpreadsheet(); var ss = event.source.getActiveSheet(); var r = event.source.getActiveRange(); ... 回答1: --edit

onEdit simple trigger never seems to be triggered

被刻印的时光 ゝ 提交于 2019-12-17 15:04:30
问题 I've been using OnEdit for some time and its been working great - however just now ive came accross a problem - basically when column 6 (f) is edited I want it to check the value - if it is "In Progress" I want it to then run a function to send an email, when I debug this - it works great exactly as I want it to, however when im not debugging it never seems to run. var summary = ss.getSheetByName("Summary") var data = summary.getRange(4, 1, summary.getLastRow(), summary.getLastColumn()); var