Questions tagged [google-apps-script-triggers]
The google-apps-script-triggers tag has no usage guidance.
35
questions
44
votes
3
answers
104k
views
Auto-updating column in Google Spreadsheet showing last modify date
Trying to figure out a way to have column two auto-update to show a timestamp of the last update. I realize the doc shows a timestamp of the last modification, but we have a lot of clients accessing ...
21
votes
7
answers
77k
views
Can I add an autoincrement field to a Google Spreadsheet based on a Google Form?
Is it possible in Google Forms to give a unique value to each row it inserts into the spreadsheet as well as the timestamp?
1
vote
1
answer
1k
views
Hide/Unhide rows based on values in particular cells
I am trying to Hide/Unhide rows based on values in particular cells, have the following code which works in isolation but not together. Below only makes B121 be active while B55 stops working. If i ...
3
votes
2
answers
10k
views
How to make Google Sheet jump to today's column when opened?
I'm trying to adjust this code so that I can jump to today's date which are all across row 2 in my spreadsheet.
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss....
1
vote
1
answer
5k
views
Running multiple onEdit scripts
I am trying to run all three of these in any order but only the third runs:
1.
function onEdit(){
var sh = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var editedCell = sh....
15
votes
5
answers
39k
views
How to make Google Sheets jump to today's row when opened?
I have a sheet that has many rows to put data. Since there are too many rows, I want to have the cursor jump to a particular row when the sheet is opened.
In other words: The date column has the ...
14
votes
1
answer
55k
views
Diference between onEdit or onChange trigger? [closed]
From what I've gathered online, onEdit only works when you edit a cell (not when a row is added or when a note/comment is added) and onChange will capture that a change has occurred and trigger when ...
2
votes
1
answer
3k
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 ...
1
vote
1
answer
528
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 ...
1
vote
1
answer
10k
views
How to trigger a script in Google sheets when a value changes
I try to fire a script when a value in a certain cell or range of cells changes.
(it's not changed by the user, so I can't use onEdit)
I've tried to use onChange, but this doesn't fire my script at ...
1
vote
2
answers
9k
views
How do you create an installable trigger for a Google Apps Script?
I've searched all over Google's documentation on this topic and I haven't been able to find a tutorial or article that explains how to do this. I completely understand how to create simple triggers in ...
23
votes
1
answer
44k
views
Add a script trigger to Google Sheet that will work in Android mobile app
I have a Google sheet that includes a script that should be run when clicking a button. The recommended way to do this (as far as I can tell) is to insert an image and then attach a script to the ...
8
votes
5
answers
28k
views
How can I make some data Autosort in a spreadsheet on edit?
I am working with a simple spreadsheet that has name/lastnames in it. I need for the spreadsheet to automatically sort the entry alphabetically by the last name (column B).
I have used the following ...
2
votes
1
answer
975
views
Run a Script When Tab Programmatically added to a Google Spreadsheet
I'm trying to pull data from an Adwords report to a Google Sheet through an Adwords script. This will be done on a daily basis. Every time the Adwords script runs, a new tab is created (and an old one ...
1
vote
1
answer
5k
views
Is there any way to identify a user in Google Apps Script?
I have a spreadsheet in Google Sheets that is shared with five people. Only a few columns are edited; all of the other columns are locked.
We need the ability to track changes to these editable ...
1
vote
1
answer
3k
views
How to automatically set date in a cell when a different cell value is changed by a formula from data on another sheet?
I currently have a column, e.g. ColB, containing SUMIF functions with its data range from other sheets and a column, e.g. ColC, with dates that I want to automatically update to the last date ColB's ...
1
vote
2
answers
1k
views
Google App Script - changeType "REMOVE_GRID"
I'm using a Google spreadsheet. I'm attempting to create an onChange trigger that will activate a script when any sheet is added or deleted. I was able to get the script to work when a new sheet is ...
0
votes
1
answer
411
views
Why don't work function onEdit(e) when using Zapier [duplicate]
I created a chatbot that using Zapier (through Webhook and JSON) for sending to my Google Sheet a name and a phone of user and Apps Script must generate a coupon code automatically. I used function ...
0
votes
1
answer
404
views
Restrict the range of a script that replaces input data to a certain range
There is this question regarding adding checkbox functionality to Google Drive: Checkbox function to automatically add to total. And a great answer is:
In the Google Sheets spreadsheet go to Tools -...
4
votes
1
answer
943
views
Google Sheets Script Editor action not applying to all sheets
I have a Sheets file with a tab/sheet for each month. I am editing the Script Editor to apply an automatic Timestamp when an item is scanned. How do I make the same script for each sheet, but make it ...
3
votes
1
answer
139
views
Add a script trigger to Google Sheet that will work in Android mobile app for merged cells
I'm new here, and I have my first question regarding the following post here:
Add a script trigger to Google Sheet that will work in Android mobile app
function onEdit(e) {
if (e.range.getA1Notation(...
2
votes
3
answers
7k
views
How can I have onEdit trigger when specific cells are selected?
I can't seem to figure out how to get my script to trigger only on the edit of specific cells and on the current sheet. I've tried just about everything and it just refuses to run the script at all if ...
2
votes
1
answer
748
views
Using a script to process form input every time a form is submitted
I'm trying to have it that every time I submit a form, it adds automatically some data. This is the script I have:
function onFormSubmit(Test) {
var sheet = SpreadsheetApp.getActiveSheet();
...
1
vote
1
answer
5k
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 ...
1
vote
1
answer
63
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 ...
1
vote
1
answer
536
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
1
answer
3k
views
Show/Hide Rows based on text in a cell
I'm trying to toggle which rows are shown/hidden on multiple sheets in my Google Sheets document. Simply put, a user will provide an input on Sheet1, which will populate a "show" or "hide" value in ...
1
vote
1
answer
3k
views
How to trigger a script when a new text value is added to specific column?
I've built a sheet that generates messages for clients based on certain input data. The message appears in a cell in column B when all the required data has been entered. When a new text value is ...
1
vote
2
answers
403
views
Help with dynamic dependent dropdown
How do I change this dynamic dependent dropdown list script so it works with my particular Google Sheet.
function onEdit(){
var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var ...
0
votes
1
answer
163
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 ...
0
votes
1
answer
433
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
1
answer
998
views
Making Google Sheets script work on multiple tabs
Below is my script or code:
function myFunction() {
}
function onEdit() {
var s = SpreadsheetApp.getActive().getSheetByName('Sheet1');
s.showRows(1, s.getMaxRows());
s.getRange('H:H')
....
0
votes
3
answers
839
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 ...
0
votes
1
answer
31
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
votes
1
answer
300
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 ...