Tag Info

New answers tagged

0

The changeType property belongs to the change event, not to the form submit event. According to Serge Insas, "to know what value is returned in the event info" instead of event.changeType use Utilities.jsonStringify(event). References Event Objects - Google Apps Script Google Apps Event changeType undefined in Google Sheet - Stack Overflow


1

Short answer At this time it's not possible to change the the default form layout directly from the Google Forms editor. Alternatives Use a HTML editor to change the resulting form. The resulting html file could be hosted in Google Drive or in another web server. Use HTML Service of Google Apps Script to create a web app and submit the answers to a ...


0

The answer validation in Google Forms could be done with Google Apps Script after the students submit their responses, i.e. by using onFormSubmit event. Once the answer was submitted, you could use the Class File to get properties like: Viewers Editors Owner It's worth to say that in the 2014 summer Google launched Google Classroom to help teachers to ...


1

if (value >= "B2") ... That's just comparing value to the string "B2". You wanted to compare to the content of the cell B2. That is, if (value >= sheet.getRange("B2").getValue()) ...


2

Short answer Don't use .getValue() on date/time cells. Instead, put =TO_TEXT(A1) somewhere (or already have A1 containing something like TO_TEXT(SUM(E2:E)), and use .getValue() to get that string. Numbers and strings pass between sheets and scripts reliably, unlike dates and times. Explanation Unlike the Unix operating systems for which the epoch begins ...


0

I don't think there is a way to do this using the methods of ContactsApp in Google Apps Script. But you can use Google+ API to search, e.g., by email address; this can be done in any language, including JavaScript (the documentation page has sample code and a form you can use to try out this search, so I'm not giving details here). This will only find ...


1

This is one of restrictions imposed on custom functions: they cannot perform tasks that require authorization, such as accessing user's files. From the documentation: Unlike most other types of Apps Scripts, custom functions never ask users to authorize access to personal data. Consequently, they can only call services that do not have access to ...


1

As an alternative to the use of a custom function, consider the use of built-in functions like vlookup(). From the previous linked help article:


4

Google offers a limited amount of computing power to Sheets users. This restriction is particularly noticeable for scripts: they take a long time to run, and trying to invoke a script too often results in errors of the type you encounter. The task you are trying to do here could be done with a single script invocation. It may still take a while to process ...


1

This is a good use case for the SUMIF function. An example is illustrated below:


1

You can use a pivot table to do that. Choose Data > Pivot from the menus, and follow the prompts to set it up. There's an example of something similar here: https://docs.google.com/spreadsheets/d/1VIeA4zAjID0y1jo1FnsbfGA4qmpRgAxMykLXi1pOfhc/edit?usp=sharing


2

You can clear only the cells with orange background (color code #ff9900) by getting the background colors of all cells with .getBackgrounds() and then checking them for being orange. function clearOrange() { var sheet = SpreadsheetApp.getActive().getSheetByName('Blad1'); var range = sheet.getDataRange(); var bgColors = range.getBackgrounds(); for ...



Top 50 recent answers are included