Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2023 12:47 PM
In this script you do the print both inside the loop, and outside (after the loop).
If there is no records matching your query, then this will happen.
First, there is the print in the loop, and because no records exists, there is nothing to print.
Then you try to print again after the loop, then the values used are not defined, so that becomes the "null" and "undefined" printouts.
Check your query and try again.
Also, correct your script and replace the following
gs.print(date.value)
// should instead be
gs.print(date.getValue('value'));