Hi,
When linking a web app URL from within Glide, a chrome window opens up.
In my case, the window returns nothing (“The script completed but did not return anything.”) which is technically great, but a bit lame from the end-user perspective.
Is there a way to trigger and execute the web app in the background other than opening and passing the user to a new Chrome window?
Using the code below, manually update over GSheets works yet update using Glide (i.e. increment update) doesn’t work and the function doesn’t fire up. Any thoughts?
function onEdit(e){
var ActiveSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(“Next Event”);
if(e.range.getColumn() == 4 && e.range.getRow() >1){
var PlayersSpreadsheet = SpreadsheetApp.getActive().getSheetByName(“Players”)
var ConfigSpreadsheet = SpreadsheetApp.getActive().getSheetByName(“Parameters”)
…
It fails at row #3 with an “TypeError: Cannot read property ‘getColumn’ of undefined” error message when trying to trigger via Glide incremental change
function onChange(e){
var ActiveSheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(“Next Event”);
if(e.range.getColumn() == 4 && e.range.getRow() >1){
In my experience, I only get this error when I try to run a script with an event value using the run button.
If you have actuallly configured all of this and the trigger the right way, it should run when you have an action that changes your sheet. Otherwise I don’t know what’s the problem here without seeing a video.
Yeah, like @ThinhDinh said, I would remove the event parameter. Your function can be called whatever you want, and with the trigger set up to run onChange, it will be called any time the sheet changes, so you will want to code to only look at certain columns in certain sheets.
You still have the (e) event parameter. There are no parameters to pass when using triggers. Any sheet changes will run the trigger and you need to specify in the code which sheet and column to look at. The error is telling you that nothing was passed in for (e), so e.range.column has no cell to look at. (e) is undefined because nothing was passed in for it.