Questions tagged [google-apps-script-triggers]

Filter by
Sorted by
Tagged with
-1
votes
1answer
22 views

Google Sheets Appscript on apply filter event?

I want to execute a script as soon as I apply a filter to my Sheet. I can't find any event in the App script Docs that will allow me to do this, no onFilter event or anything obvious anyway. Does ...
0
votes
1answer
23 views

Trigger for onChange on add new row only

I want the trigger which work for 'add new row' only, but not other edit function. Right now the changeType of the onChange are Edit(include add new row), INSERT_ROW (but not add new row), etc., which ...
0
votes
1answer
18 views

How do I code 3 series dependent drop down on multiple sheets?

I have a code to run a 3 tier dependent drop down list - it currently works for one sheet in my workbook named "BlankNode" but I need it to work for ~20 different sheets. I tried adding a ...
0
votes
1answer
23 views

Trying to run two functions onEdit

I have found two scripts that work independently, but fail when combined. I get this error message ReferenceError: myfunction2 is not defined onEdit @ Code.gs:3. I want one field to populate the ...
0
votes
2answers
32 views

Generate sequential numbers in first column based on value in other column

I'm having a problem implementing a spreadsheet with several sheets that use data registered continuously on the first. I found a solution with this script on the forum but I don't know how to edit, I'...
0
votes
1answer
23 views

Sending an email with just an attachment with script

Here is my script for forwarding emails to another inbox. However, now I want to only send emails that are unread with attachments to one email and then if no attachment to a different email. Can ...
0
votes
1answer
19 views

Depending on Sheet being edited, get a cell value and trigger OnEdit update

This code works but not as intended. The workbook has several tabs (Sheets) and if the user is editing Tab1, then and only then a trigger OnEdit should execute. If the user is editing some other tab (...
0
votes
0answers
7 views

Send an email with google sheets when cells match from 2 sheets

I am attempting to develop a sign in/out sheet for high school students. Students will sign in/out in the office and once they do this I want an email to be sent to their specific teachers to notify ...
0
votes
0answers
21 views

OnEdit Trigger to update whenever any change is made

How can I make this trigger every time I make any edit to my Google Sheet? function addNote() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getSheets()[0]; var targetCell = ...
-1
votes
1answer
25 views

Trigger fails when executing sendEmails function

I created a script to send emails with calculated information from a sheet. The script works beautifully when run manually. I would like this to trigger every minute, but when I try to create any kind ...
0
votes
1answer
40 views

How to trigger onChange trigger on inserts only

I am trying to create a trigger that sends emails when lines are appended or inserted to a sheet. The problem I have is that the python script that is connected to the google sheet purges sheet "...
0
votes
1answer
21 views

On Google Forms, can someone edit their response but can't add a new one?

For example "someone 1" edits their response via the link that I have added in the Google Spreadsheet (https://drive.google.com/file/d/1gtULaR5VEfuLOP4f73Z3KofsnksmpSid/view?usp=sharing), ...
1
vote
1answer
34 views

How to to get coordinates from addresses coming in from importrange?

I have addresses coming in from importrange and I am using this script to get coordinates. function myFunction() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Geo 4') var range =...
1
vote
1answer
122 views

Clear Cell Script Google Sheets

I'm looking to run some script to clear the contents of a cell in column E (i.e. E3) when a cell in column I (i.e. I3) is edited ("Complete" is selected from drop down list). I found this ...
0
votes
1answer
847 views

Google Sheets script- Copy and paste data from fixed cell to a row corresponding to a cell with current week date

I have a Google Sheets document where I track status of a project as red/yellow green. the live count of Red/Yellow/Green are in Cells BU1 BV1 and BW1 of my summary Sheet. Now I have a table below in ...
0
votes
1answer
236 views

How to open a specific tab based on today's date (Google Sheets)

I've made a 'Google Sheets' with 31 tabs for the dates of the month (1-31) How do I write a script that makes the spreadsheet open to that days tab? e.g. open tab 25 if today is Aug 25th I imagine (...
0
votes
1answer
58 views

Script Execution succeeds but reports failure

I'm running this script on a Google Form responses sheet: function autoSort(sheet) { var SORT_COLUMN_INDEX = 10; var ASCENDING = true; var NUMBER_OF_HEADER_ROWS = 1; var range = sheet....
0
votes
1answer
185 views

How to run a different script on multiple Google Sheet tabs?

The code writes an auto email once a trigger is met in the sheet. There are 3 different tabs pulled from the main sheet and each tab should run the script but with a different message for each tab. ...
1
vote
1answer
192 views

How to open sheets to a specific tab based on days of the week?

I have a file with 7 tabs or sheets each of them represent a day of the week (Monday to Sunday). In each day (Tab) a have this formula in B2 to show the day of the week if it is today... =IF(WEEKDAY(...
1
vote
1answer
31 views

The script(onSubmmit Trigger) only works in the script editor and doesn't work when the form is actually submitted

This is a follow up of How to send email to a person selected from a dropdown menuwith all answers of a response of the form submission? I want to notify mentors if they're selected by a user on a ...
0
votes
1answer
119 views

How to send email to a person selected from a dropdown menuwith all answers of a response of the form submission?

I want to notify mentors if they're selected by a user on a Google Form. The names of the mentors are in a drop-down menu in the Google Form. This is the form: https://forms.gle/iNuA5nB2J9koKhXt6. I'...
0
votes
0answers
1k views

What's causing this error when running Google sheets script?

Exception: The parameters (String,String,String,(class)) don't match the method signature for CalendarApp.Calendar.createEvent. (line 31, file "Copy of Code") 29 if (eventID != complete){ 30 ...
0
votes
1answer
18 views

Get exactly data to put on email message?

I got a function to email notice like this code below: function approvedby() { var approvedrange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Responses 1").getRange("E2:E500"); var ...
1
vote
1answer
841 views

Can automatic send emails when checkbox = True?

I'm looking for an script can automatic send emails when checkbox is True. This is my format example: What i want is when im clicking on checkbox = True at F2, i can recieve an email with excactly ...
0
votes
0answers
30 views

Color cell background automatically if value has changed from original

Is it possible to automatically color cell backgrounds if their values has been changed (in my case, the only time a cell changes value is by manual user edit/input - no cell values are computed of ...
1
vote
0answers
46 views

Can I add a unique autoincrement field to multiple answers in a column in a Google Spreadsheet based on a Google Form?

I need to add a unique autoincrement field to multiple answers in a column in a Google Spreadsheet based on a Google Form. I was able to add the function trigger in scripts but I need to add the ...
0
votes
0answers
457 views

Script trigger to Google Sheet that will work in Android mobile app

Would someone please help me script a trigger to start a macro in Google Sheets running on android 7.0. As Probaton asked in 2015 I have a similar problem. My macro works great in Google sheets on my ...
0
votes
1answer
30 views

Can't get If Else statement to run based on value of edited drop-down selection in Google Sheets Script

I have a dropdown field on a sheet (consisting of Wheat, Wood, Stone, etc.). When that dropdown field is edited, I want it to run one of a few similar functions, based on the dropdown selection (when ...
1
vote
1answer
3k views

TypeError: Cannot read property 'range' of undefined at onformsubmit again after creating an event object

This is what I have written in Script editor so as to auto-apply a formula to a new added row when a new response is submitted on the Google Forms linked to my spreadsheet. First I was using ...
0
votes
1answer
2k views

TypeError: Cannot read property 'range' of undefined at onformsubmit(Code:10:17)

I am getting this error when running :TypeError: Cannot read property 'range' of undefined at onformsubmit(Code:10:17) I have installed the onformsubmit trigger but it is not working. What is not ...
0
votes
1answer
61 views

Google form adding more than one row every time

I know that when a new response is submitted on Google form, a new row is auto-added to the linked spreadsheet. I use several onformsubmit triggers for my form and linked spreadsheet. But I do not ...
0
votes
1answer
37 views

Prevent a Google Script from Modifying Date

I have a Google Sheet that I am applying an onEdit script to. That script (borrowed from WebApps:Convert all text to UPPERCASE in a Google Spreadsheet) capitalizes all new entries in every field of ...
1
vote
1answer
309 views

How do I run multiple onEdit functions in the same spreadsheet in Google Sheets?

all! I hope I can count on your expertise to help me with a project I'm working on. I want to call different functions based on which spreadsheet the event happened. Ex. Typing 1 in B6 on "Room ...
0
votes
1answer
246 views

Continuation token: Generate file listing of a google folder into a google sheet

I have a folder on Google with 18k files and need to list some variables from them into Google sheet. A solution for this was found on Insert image from Google Drive into Google Sheets However, ...
-1
votes
1answer
22 views

Google Sheets calendar script is timing out

function onEdit(e) { var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getActiveSheet(); if(sheet.getName() != "Sheet2") { return; } var lastColoum = sheet....
0
votes
2answers
1k views

How to Clear Cell(s) based on the Value of another Cell

I am looking for a script that will clear cell(s) when the value of another cell changes or is equal to ("X"). In the attachment I would like when Column "G" gets checked marked (TRUE), then ...
0
votes
0answers
290 views

Google App Script to Hide & Show Rows Based on Dropdown Selection on Active Sheet

I am trying to create code that will automatically hide or show rows depending on the selection of the dropdown on whatever sheet is currently active. The drop down selection is a list of all the ...
0
votes
1answer
106 views

Determining location of checkbox that activated a script?

I have hundreds of checkboxes in multiple sheets on a single Google Sheets project. When a user clicks a checkbox, I want a script to activate. In that script, I need to know what cell the checkbox ...
0
votes
1answer
482 views

Using Google Apps Script in with arrayformula?

I'm using an array formula in Google Sheets to determine when a cell shows 'Expired' based on date. When the cell shows Expired, I've a script which should transfer rows with Expired to another sheet....
0
votes
1answer
37 views

How can I make some data on a Google Sheets auto-sorting but in different columns in every sheet?

If i want to sort different columns in every sheet, what do i have to change? function onEdit(event){ var sheet = SpreadsheetApp.getActiveSpreadsheet(); var editedCell = sheet.getActiveCell(); ...
1
vote
1answer
105 views

How can I get to the bottom of a Google Sheet

I want to open my Google Sheets and go automatically to the bottom/last line entered as there are over 2000 lines. I have entered the below text in: tools > script editor, as seen in another post ...
0
votes
1answer
23 views

postEdit functions getting range

Does anyone know how I can change the below function to postEdit rather than onEdit? I am trying to set this in an autoSort function so that the sheet will be edited only after all values in an ...
1
vote
1answer
23 views

Setting a trigger to send mail when data is added to a row that was empty

I`ve got an external app that sometimes adds data to the last row of a sheet, is there a way to trigger this to send a mail with the content of that row?
1
vote
2answers
1k views

Is there a way to allow users to access Google Sheets with installable triggers without manually signing in?

I have set up a Google Apps Script that validates data that is entered into various Google Sheets files. I am looking for a way to allow users to access those Google Sheets files without making them ...
0
votes
1answer
480 views

Help needed with script that auto-updates cells in column in Google Spreadsheet showing last modify date

I'm looking for some help with a script for a spreadsheet. I found a script (see below) that does half the trick for me, but I encounter two difficulties. What I am trying to accomplish is the ...
0
votes
1answer
732 views

Have script ignore first row [duplicate]

I am using this script to add in a date whenever a row is edited. I want it to ignore the first row. Thoughts on how to do this? function onEdit() { var s = SpreadsheetApp.getActiveSheet(); // ...
0
votes
3answers
606 views

Trying to run two scripts on same sheet and getting error

I found a code to run the two different scripts online, however i keep getting an error Missing ; before statement. Original function onEdit(e) { oneditfx1(e); oneditfx2(); } function ...
-1
votes
1answer
200 views

Cut and paste data from a row of cells from one tab to another tab in Google Sheets and repeat with new data

The below code works for Q3 but not for Q5. I'm relatively new to sheets and writing code and I'm sure that you can't have two functions with the same name but am unsure how to resolve so that I can ...
1
vote
1answer
2k views

Auto hide row based on cell text (formula based)

My plan is to hide an entire row if a specific cell in the row showed specific value. I already found the script and the script work amazing. But the problem now, since the script use onEdit function, ...
-1
votes
1answer
112 views

Script sometimes it works sometimes it dosent

I have 2 columns to enter Lat and Long coordinates in ( E and F ), those also contain the Formulas (for all rows, I just happened to choose row 768below) =IFERROR("N"&left(index(Split(D768,"N"),1)...