google-apps-script-editor

securing a Google Apps Script linked to an authorized trigger so others can edit

删除回忆录丶 提交于 2019-12-11 09:13:36
问题 I am pretty sure my understanding is correct but since I cannot find any Google documentation that explicitly highlights this I wanted to ask here. Per https://developers.google.com/apps-script/guides/triggers/installable: Installable triggers always run under the account of the person who created them. And we know that when you create a trigger it will ask to authorize for all the scopes the script uses. Then, that means that anyone with edit access to the script could leverage the Google

How to copy data validation in a relative way, specifically list from range (with or without scripts) Google Sheets

北慕城南 提交于 2019-12-11 06:49:25
问题 I have created a spread sheet to track appointments. Within this spread sheet I have dynamic dependent drop down lists, so the choice from list 1 will populate the options in list 2. This is as follows: Cell C2: Client - Client 1 or Client 2. (this is for the use of the example, the actual lists will expand.) If cell C2 = Client 1 then the address drop down is as below: Cell C3: Address - Address 1 or Address 2. If cell C2 = Client 2 then the address drop down is as below: Cell C3: Address -

“Register in Chrome Web Store” not showing in Google script editor

眉间皱痕 提交于 2019-12-10 10:25:48
问题 I am trying to publish a script (called "Paypal store" in the scripts gallery) as a web app in Chrome Web Store, but the item "Register in Chrome Web Store" is not showing in the "Publish" menu of the Google script editor (the only items present in this menu are "Publish to gallery" and "Deploy as web app"). What can I do? 回答1: The "Register in Chrome Web Store" option only shows up for standalone scripts, not scripts contained in spreadsheets. Take a look here for more. 来源: https:/

google spreadsheet script editor: delete a project

♀尐吖头ヾ 提交于 2019-12-05 22:54:14
I have two script projects for a spreadsheet. One was a temp one for development testing. I want to delete the temp one. When I click on script editor it shows both projects, and I can select one, but there is no option for deleting. Also when I open the project itself there is no delete option. I have seen other SO threads (such as this ), but it seems the interface is changed since then. Attached the screenshots. Script Editor File menu: Make sure that you are the owner of the script. I've tried to replicate your issue in other scripts which I don't own and it seems that I cannot see a

How to determine which row has changed/updated on Google Sheets Script Editor

半腔热情 提交于 2019-12-02 00:43:43
For my google sheets, each row gets populated at random, but when it does get populated, I want a function to run. Each time something gets populated, it's the next row (it's not a cell or a random row). I have the onChange trigger running right now. It is set to "run FunctionA from Spreadsheet on change". In that function, how do I grab the row that has been specifically changed/updated? What is the function/method I would use to manipulate whatever that row is? I searched around but couldn't find an appropriate answer. You should use the onEdit spreadsheet event. ( https://developers.google

Trigger email alert based on last row's condition NOT WORKING

一世执手 提交于 2019-12-01 12:12:53
I attempted to build a script but there are some issues. The table format are 2 columns which are date and values. These are the needs: IDEAL STATE Grab the last filled row (today's date) in the Google Sheets called "test". Check in that row if the value in column F is greater than 0.5. If it greater than 0.5, then trigger an email. In email body, it should state "Results found on [date]." This was my starting point but it does not produce what I want. These are the issues: CURRENT STATE 1.The script grabs every row in which column F was greater than 0.5 in the past. I only want to check for

Google Apps Script; Docs; convert selected element to HTML

六月ゝ 毕业季﹏ 提交于 2019-12-01 11:11:24
I am just starting with Google Apps Script and following the Add-on quickstart https://developers.google.com/apps-script/quickstart/docs In the quickstart you can create a simple add-on to get a selection from a document and translate it with the LanguageApp service. The example gets the underlying text using this: function getSelectedText() { var selection = DocumentApp.getActiveDocument().getSelection(); if (selection) { var text = []; var elements = selection.getSelectedElements(); for (var i = 0; i < elements.length; i++) { if (elements[i].isPartial()) { var element = elements[i]

Trigger email alert based on last row's condition NOT WORKING

荒凉一梦 提交于 2019-12-01 11:01:37
问题 I attempted to build a script but there are some issues. The table format are 2 columns which are date and values. These are the needs: IDEAL STATE Grab the last filled row (today's date) in the Google Sheets called "test". Check in that row if the value in column F is greater than 0.5. If it greater than 0.5, then trigger an email. In email body, it should state "Results found on [date]." This was my starting point but it does not produce what I want. These are the issues: CURRENT STATE 1

Why does google script editor stop paren matching after 100 lines in a function and does it affect the code?

☆樱花仙子☆ 提交于 2019-12-01 06:22:33
in google script editor function foo(){ . . . // more than 100 lines . . } clicking on { or } highlights both in red with less than 100 lines both are green. Does it affect the code or is it just there to confuse us. I've tried this myself, and reproduced your results, using Chrome on Windows Vista. The paren matching went Red with exactly 100 blank lines between the opening and closing braces. Steps to try, for the non-believers: In Drive / Docs, create a new script for a blank project. Start with the template for "myFunction()". Place the cursor next to the opening or closing brace, and

External Editor Support for Google Apps Script

◇◆丶佛笑我妖孽 提交于 2019-11-30 00:02:30
I am using Google Apps Script and was wondering if I could use any sort of editor outside of the one Google provides. (I purchased Sublime Text and would like to use that.) The one Google provides is disgusting, with tiny text even though I have a giant screen and syntax colors that I find a bit difficult to distinguish on a white background with small text, and I don't have the beauties of Sublime like tons of custom keyboard shortcuts, all of my packages, etc. Google has dropped support for Apps Script inside Eclipse but you can set up a local development environment inside VS Code using the