Connect with us

Tech

Google app script not reading columns as variables

 


I work at a school and we're using a variation of TJHouston's script to manage the invoices that go out to people who use the services of our car dealership. The person who set all of this up has left the company and we've made copies of all the documentation relating to the invoicing system. The process goes like this:

Google Forms Sheet attached to the form Document that the script will use as a template to fill out and email to “customers” Below is the beginning of the script (I've included up to line 16, but it always fails on line 13). I've numbered it manually here for clarity: 1// TJ Houston tjhouston.com ([email protected]) 2// Bus operation report 3// Get template from Google Docs and name it 4 var docTemplate = “1r1jI_7s6KU5vRwZGjeQnzfGvizmgOq2IiY2z8KGxxMY”; // *** Replace with your template ID *** 5 var docName = “SCHSAutoShopInvoice”; 6 7// When the form is submitted 8 function onFormSubmit(e) { 9 var sheet = SpreadsheetApp.getActiveSheet(); 10 var row = SpreadsheetApp.getActiveSheet().getLastRow(); 11 12 // Get information from the form and set it as a variable 13 var keyDate = e.values[0]14 var keyName = e.values[1]; 15 var keybName = e.values[26]16 var keyMail = e.values[2];

After I enter the document template ID and (later in the script) the folder to dump to, the script keeps failing on line 13: var keyDate = e.values[0]; it looks like you're not reading the columns from the spreadsheet as variables. There may be an error later in the script that's throwing the error on line 13. Below is a screenshot of the first few columns of the sheet that the form populates. Enter a description of the image here.

The strange thing is, using the forums in his folder system worked fine, but copying everything seems to make the script fail. It's like the script can't find the sheets. Any help would be much appreciated.

I've verified that all the Google IDs are correct, I've moved the file from an org shared folder to my own folder, and adjusted permissions in case that might be the cause (to no avail). No matter what I adjust it doesn't seem to fix this error: enter image description here

Sources

1/ https://Google.com/

2/ https://stackoverflow.com/questions/78707721/google-apps-script-not-reading-columns-as-variable

The mention sources can contact us to remove/changing this article

What Are The Main Benefits Of Comparing Car Insurance Quotes Online

LOS ANGELES, CA / ACCESSWIRE / June 24, 2020, / Compare-autoinsurance.Org has launched a new blog post that presents the main benefits of comparing multiple car insurance quotes. For more info and free online quotes, please visit https://compare-autoinsurance.Org/the-advantages-of-comparing-prices-with-car-insurance-quotes-online/ The modern society has numerous technological advantages. One important advantage is the speed at which information is sent and received. With the help of the internet, the shopping habits of many persons have drastically changed. The car insurance industry hasn't remained untouched by these changes. On the internet, drivers can compare insurance prices and find out which sellers have the best offers. View photos The advantages of comparing online car insurance quotes are the following: Online quotes can be obtained from anywhere and at any time. Unlike physical insurance agencies, websites don't have a specific schedule and they are available at any time. Drivers that have busy working schedules, can compare quotes from anywhere and at any time, even at midnight. Multiple choices. Almost all insurance providers, no matter if they are well-known brands or just local insurers, have an online presence. Online quotes will allow policyholders the chance to discover multiple insurance companies and check their prices. Drivers are no longer required to get quotes from just a few known insurance companies. Also, local and regional insurers can provide lower insurance rates for the same services. Accurate insurance estimates. Online quotes can only be accurate if the customers provide accurate and real info about their car models and driving history. Lying about past driving incidents can make the price estimates to be lower, but when dealing with an insurance company lying to them is useless. Usually, insurance companies will do research about a potential customer before granting him coverage. Online quotes can be sorted easily. Although drivers are recommended to not choose a policy just based on its price, drivers can easily sort quotes by insurance price. Using brokerage websites will allow drivers to get quotes from multiple insurers, thus making the comparison faster and easier. For additional info, money-saving tips, and free car insurance quotes, visit https://compare-autoinsurance.Org/ Compare-autoinsurance.Org is an online provider of life, home, health, and auto insurance quotes. This website is unique because it does not simply stick to one kind of insurance provider, but brings the clients the best deals from many different online insurance carriers. In this way, clients have access to offers from multiple carriers all in one place: this website. On this site, customers have access to quotes for insurance plans from various agencies, such as local or nationwide agencies, brand names insurance companies, etc. "Online quotes can easily help drivers obtain better car insurance deals. All they have to do is to complete an online form with accurate and real info, then compare prices", said Russell Rabichev, Marketing Director of Internet Marketing Company. CONTACT: Company Name: Internet Marketing CompanyPerson for contact Name: Gurgu CPhone Number: (818) 359-3898Email: [email protected]: https://compare-autoinsurance.Org/ SOURCE: Compare-autoinsurance.Org View source version on accesswire.Com:https://www.Accesswire.Com/595055/What-Are-The-Main-Benefits-Of-Comparing-Car-Insurance-Quotes-Online View photos

ExBUlletin

to request, modification Contact us at Here or [email protected]