Web App - Search a Match in Spreadsheet - Google Apps Script Web App Tutorial - Part 5

Learn Google Sheets & Excel Spreadsheets · 132K views · 2019 · 31:47

Open on YouTube

Web developmentPython, Ruby & scripting languagesSoftware (other)tutorial

Why Stack Overflow recommends it

Stack Overflow users link it as a reference when building Apps Script web apps that look up spreadsheet values and fill in form fields from the result.

Recommended by 0 people across 0 different months, 2020 to 2022.

What it is

Part 5 of a Google Apps Script web app tutorial series. The presenter shows how to call server-side functions from the browser with google.script.run, handle the result in a success callback, and search a Google Sheet for a zip code to return a matching value from another column.

What people said

Cites Amaren · 2020-05 · Stack Overflow · on “Only first element is visible in Dynamic Dropdown list”

M.updateTextFields() [LINK] do not update dynamic dropdown, it updates the text fields. So there is a need to store a global reference to materialize select box to initialize it, post that there is a need to destroy that instance, and then reinitialize the select box again. <script> document.addEventListener("DOMContentLoaded", function () { var elems = document.querySelectorAll("select"); var instances = M.FormSelect.init(elems); }); document.getElementById("nativeState").addEventListener("change", getDistr); function getDistr() { var state = document.getElementById("nativeState").value; google.script.run.withSuccessHandler(updatedistricts).getDistricts(state); } function updatedistricts(di

Cites Eliza Matthew · 2021-05 · Stack Overflow · on “TypeError: Cannot read property 'name_dropdwn' of undefined userClicked @ Code.gs:23”

I was trying to enter entry through submit button and send the data into spreadsheet accordingly. However the submit button did not attempt anything as the error in userClicked function in code.gs shows TypeError: Cannot read property 'name_dropdwn' of undefined. The Name field is populated from spreadsheet, in which the Email field is matched from the data in the spreadsheet and auto populate the field answer. I was following this tutorial on youtube [this video] but I get the error. Anyone knows how to solve it? page.html <div class="inner-card"><!--start row--> <label>Name</label> <select class="browser-default" id="name_dropdwn" onchange="getAutofill()" type="text" required> <option value=""

Cites StephanB · 2022-07 · Stack Overflow · on “Add/Update Google Sheet Row Data Comparing Values from HTML Form Using Google Apps Script - Trying to Find Match on Sheet & Update Selected Row Data”

I have an HTML form that allows users to populate the form from a Google Sheet, and successfully add new rows to the Sheet. I created the Apps Script according to this [LINK] tutorial. I am trying to expand the function of my Apps Script to search the rows of entries for duplicates based on data from two columns and if there is a match, overwrite the existing row. I know I need a for loop that iterates through each row in the Google Sheet to compare to the form data fields in question, but I don't know how to access each. This is a shortened example of the the form (the actual is much longer): <form id="form"> <form id="form"> <input name="firstName" placeholder="firstName" /> <input name="l