From 4b35d44abc70d1fe7696e0736c1712b920b65cb0 Mon Sep 17 00:00:00 2001 From: Ryan Marina Date: Wed, 10 Jul 2024 17:25:00 -0500 Subject: [PATCH] add a small warning and an explanation --- Code.gs | 5 +++++ howto/README.md | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/Code.gs b/Code.gs index de34ec2..d7c32ba 100644 --- a/Code.gs +++ b/Code.gs @@ -206,6 +206,11 @@ function filtration(data, interns, adults, children) { var output = []; for(datum of data) { + if(datum === undefined) { + SpreadsheetApp.getUi().alert("Couldn't find an intern -- skipping. See the manual for more information.") + continue; + } + if(interns && datum.age == "Intern") { output.push(datum); } else if(adults && datum.age == "Adult") { diff --git a/howto/README.md b/howto/README.md index 39a5923..3ee702d 100644 --- a/howto/README.md +++ b/howto/README.md @@ -97,6 +97,15 @@ You should see some spreadsheets being magically created, and when you look at t Whenever you make a change to a sheet with an asterisk in front of it, the sheets with the greater than symbol do not synchronize automatically. You need to repopulate them manually by clicking on the "Regenerate Reporting Spreadsheets" button. +### I've got an error message + +Below is a series of error messages you may get when using this software, and an explanation of what might have gone wrong. + +**Couldn't find an intern -- skipping** + +This means that the software couldn't find an intern listed in one of the individuals present within the Site Information sheet. +Make sure that each person who you reference in the "Those Present" column actually exist in the "Intern Data" sheet, and this error goes away. + ## Questions? If you have any questions, email [me](mailto:ryan@beepboop.systems). \ No newline at end of file