ReferenceError: urls is not defined assignEditUrls

135 views
Skip to first unread message

Leen Hoefnagels

unread,
Jun 22, 2022, 2:46:38 AM6/22/22
to Google Apps Script Community
Hi

Can someone help me with this error?
This is my Script: 
I get:

Fout
ReferenceError: urls is not defined
assignEditUrls
@ Code.gs:24



for (var j = 1; j < data.length; j++) {

resultUrls.push([data[j][0] ?urls[timestamps.indexOf(data[j][0].setMilliseconden(0))]:""]);

}

sheet.getRange(2, urlCol, resultUrls.length).setValues(resultUrls);

}

Thx

Jonathan Butler

unread,
Jun 22, 2022, 9:12:12 AM6/22/22
to google-apps-sc...@googlegroups.com
The "urls" variable hasn't been defined. 

resultUrls.push([data[j][0] ?urls[timestamps.indexOf(data[j][0].setMilliseconden(0))]:""]);

You can fix the error by defining it. For example: var urls = [];



--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/1ff2c989-36ad-46a6-b697-82e1c0c7a7afn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages