Questions tagged [google-apps-script-menu]

0

votes
0

answer
3

Views

Is there a way to remove protection in google script for a user?

I need to remove protection for a user that has access to certain cells but needs all the cells when the script is running. After that i then need to protect the sheet again apart from the protected cells.
Robert Hall
1

votes
2

answer
857

Views

Service using too much computer time for one day

This indicates that the script exceeded the total allowable execution time for one day. It most commonly occurs for scripts that run on a trigger, which have a lower daily limit than scripts executed manually. The limit as far as I am aware is 6 hours per day. None of my scripts run for that long....
Subhash Kapoor
1

votes
1

answer
277

Views

Dynamically Bind Data source to app maker popup

I need to have a generic 'Delete confirmation' pop up and dynamically bind data source to the pop up using event fired before pop-up is appeared. Popup will be appeared on clicking the delete icon on 'Location' Page (screenshot bellow). I need to set the data source of the popup at the same time. (w...
Ajith
1

votes
2

answer
150

Views

There was an error during the transport or processing of this request. Error code = 10, Path = /wardeninit

I'm trying to pass an object (contents of a sheet row) to an apps script template. You can see the row in the screenshot. my function in apps script contains: var sendableRows = rows.filter(function (row) { //ONLY CHECKED ROWS. return row['Index'] == true; }); var sendableRow = sendableRows[0]; Lo...
user61629
1

votes
2

answer
61

Views

Issue with rolling random “dice” numbers and then summing values (GAS)

I've been trying for hours now to figure out why my random 'dice' roll function won't produce the results I'm looking for. My roll function: function roll(min, max, count) { min = Math.ceil(min); max = Math.floor(max); var result = [] for (var i = 0; i < count; i++){ result.push(Math.floor(Math.rand...
Lee Renfree
1

votes
3

answer
50

Views

Filtering for presence multiple sub-strings in apps script

In apps script I have an object that looks like: message_objs.push({ 'body': message.getPlainBody(), 'date' : message.getDate(), 'from' : message.getFrom(), 'to' : message.getTo() }) which I am building from received emails in the inbox I'd like to filter the emails by domain of sender so I can do:...
user61629
1

votes
2

answer
57

Views

How to implement the makeApiCall() method after migrating Google Sheets API v3 to v4 with Oauth Authorization in Javascript

Google has build v4 of the Google Sheets API but the documentation of this is still at v3. There are no full examples of how to implement a simple OAuth authentication with Google Sheets API v4. I see a migration guide here and I also see a partial example here But a full example is nowhere to be fo...
Elnoob
0

votes
0

answer
3

Views

Is there a way to send multiple mails on a single thread?

I need to send data in a form of a spreadsheet, the requirement here is to send multiple mails on a singe thread. Is it something to do with thread ID? And if so how to use it? I went through Google app script documentation, but I'm quite confused now. I have a hunch that it can be done using thread...
Yash
0

votes
0

answer
3

Views

How to copy the value of one sheet to another sheet Google sheets Script

I have a customer sheet and a invoice sheet When I go to the invoice sheet D12 and I type the invoice ID that's located in the customer sheet, then I get all the data from some vlookups. But what I want is this: I click on a cell in the customer sheet where the invoice number is located in that row....
Ralph Schipper
0

votes
0

answer
2

Views

Count based on font color and time

This is a two part challenge with two conditions. Part1: I need to count the number of times strings is repeated in a range of cells with a font color condition. The counting is easy to do in sheets with a query() formula, but the font color condition is not possible there. Enter Google Apps Script...
Rune Røsten
0

votes
0

answer
5

Views

Time limited questions in Google Forms

Is there a way to set a time limit on an individual question in Google Forms, using script editor - so that the user cannot edit their response once the time has lapsed?
Sky Caves
0

votes
0

answer
3

Views

Inconsistent error message ''Action not allowed (line 298, file “<functionName>”)"

Context Using g-suite, I have a google form that users submit information to a google sheet. Code aligned to the google sheet takes the submitted information and outputs a google doc/pdf. This final doc/pdf is created by copying a master doc template, merging/appending sections from other template d...
Tim Monaco
1

votes
0

answer
6

Views

How to hide rows if cell is not blank

I'm still very new at this so it's probably an easy fix, but I need to hide a row if Column D is NOT empty. Column D will have multiple dates so I just need to hide it if anything appears in Column D. I also want it to apply to all tabs within the spreadsheet. Any help would be much appreciated! fun...
Amanda Boyter
0

votes
0

answer
3

Views

How to insert a checkbox in a given cell when one is deleted

I am looking to create a script that replaces checkboxes in given columns when they are deleted. Below is an image depicting my setup. I would like it so when a row is deleted only the columns with checkboxes will be replaced with checkboxes again. Image of sheet I am looking to replace only the lab...
brendann755
1

votes
3

answer
7.2k

Views

Google App Script Adding one Day to a date

I can't figure out how to add one day to a date in Google App Script. I have this script: function dateTest() { var testDate = new Date(); var secondDate = new Date(testDate.getDate()+1); Logger.log(testDate); Logger.log(secondDate); } Which produces the following log: [16-11-30 16:35:02:499 GMT] We...
Dan Howard
1

votes
0

answer
7

Views

How can I fix 'Unchecked runtime.lastError: The message port closed before a response was received.' when linking to G-Cal events?

I am attempting to generate a link that takes the user directly to the Google Calendar event selected. The link I generate is identical to the link that you arrive at when going through the Calendar interface, however, when the user selects the link it loads a blank white page with the Google Calen...
Elias White
1

votes
1

answer
88

Views

CacheService.putAll ignoring keys over a certain value

I have a problem with putAll() method of google cache for script. The method seems working but only with first (~100) pairs In my script i have to cache a big number of rows (~2500 * 3), each row in a different key, and I found malfunction in cache service. To identify the problem I wrote a simple c...
brazoayeye
1

votes
3

answer
102

Views

Google Apps Script: setFormulas and rangeList

I'm trying to setFormulas over a range of non-contiguous cells. I need a formula (they're all different) set every 30 cells in a single column (c). It works to setFormula for each cell, but creating 56 variables seems unnecessary. I can get the formulas but not set them as intended. I also tried us...
N.O.Davis
1

votes
1

answer
40

Views

Using google spreadsheet as a database for a tumblr theme?

I am currently using tumblr as a website for my club. On tumblr there is a page, where every club member has a 'profile card' with their name, description and profile image. I wondered if there is any way to create a google spreadsheet with the members' information and use the spreadsheet as a datab...
Didi Kong
0

votes
0

answer
5

Views

Alert Pop-up three days before today of a date column in googlesheets

I'm new to Google App Script and need help. I'm trying to have a pop-up box three days before the date of all my dates in column (B). Please Help Thanks
mohammad shafiei
1

votes
0

answer
10

Views

Email Notification when google docs were updated

I am creating a web-based tool that will serve as repository of all google docs of the operations. Is there a way that an email notification can be triggered when a file is updated? I didn't try anything yet as I have no idea how it will works in google script. The only idea that I have is to put a...
Julius Ticong
1

votes
2

answer
10k

Views

Google Forms Complex Email Send on Form Submit with Script

I have this right now as a script to send an email to myself as a test showing that there is a new application submitted, but I am looking to have a full-fledged email sent to our HR department giving the name of every field following by a : and a space then what their answer was. I know you can do...
1

votes
0

answer
32

Views

sheets add-on giving 1-hr trigger error, even when there are no triggers installed

I wrote my first google app script with simple menu & sidebar; it works fine from script-editor but when I publish it as a 'sheets add-on' then 1. one of the textbox's in sidebar is missing 2. sidebar's submit/cancel buttons are not working Further more, on executing other menu items ... I keep on...
Deepak Kumar
1

votes
1

answer
41

Views

How can I store a copied google document element?

My code currently searches for a predefined start tag in google document, and locates a corresponding ending tag. The position of the tags is retained in a variable. Next the code runs through and copies all of the elements between the tags into a second google document. This works as expected. Ho...
Jason Allshorn
1

votes
0

answer
283

Views

Google Script HMAC SHA512 output differs when adding '\n'

I'm trying to create a google script that generates a HMAC signature using SHA512 for authentication to an API. Here is the code I'm using: var SystemTimeMilli = Date.now() var InputString = ('Some Text' + '\n' + SystemTimeMilli); var PrivateKey = 'bEDtDJnW0y/Ll4YZitxb+D5sTNnEpQKH67EJRCmQCqN9cvGiB8+...
JayDough
1

votes
0

answer
342

Views

I need to make multiple copies of google sheets, including sharing and permissions

I have weekly, hour by hour production logs for many different machines. I need to make 52 copies at a time, keeping permissions intact. I did find a way to make copies, but I lose the permissions on the protected ranges. This is how I made the copies- function copyDocs() { for(i=0; i
Michael Lake
1

votes
1

answer
124

Views

Google apps scripts set cell formulas needing row number for a row added via appendrow

I have a google sheet that is populated with activities via a google form. One of the fields is an activity date field. Once done, the activity is moved to another sheet for reporting purposes via appendrow. var cells = [activityDate, title, completionDate, ...]; destsheet.appendRow (cells); To ai...
BrianScheffer
1

votes
1

answer
164

Views

passing multiple arguments to addCallBackElement Google Script

Is there any way to add multiple arguments to an addCallBackElement() function in Google Scripts? I want to send information about what the user typed into a given text box, as well as an integer. Can I send both of these? If not, is there any way I can see what the user typed into a textbox without...
Ethan Goldberg
0

votes
1

answer
5

Views

How to copy last row from google sheet and copy to last row of other google sheet

I've tried every example and have been working on this for days, appreciate any help. I just want to copy the last row from one sheet and copy it to the last row of another sheet. This last example copies all the rows, not just the last row. I have tried every sample and example I could find without...
Burt Lewis
1

votes
1

answer
41

Views

how to prevent manual changes (that are not written by the script) on a sheet?

I have a Google sheet where I need data to be entered on it only by script and I need to protect it from manual adjustment by protecting the rows already filled by script, the case is we are a team and a script logs all the changes every team member does in a row on a separate sheet (ChangeLog). Th...
Mostafa Abusamra
1

votes
2

answer
96

Views

Get value of object field using variables to build the field name

I am using a free currency converter API as shown in the code: // Free Currency Converter url = 'https://free.currencyconverterapi.com/api/v5/convert?q=EUR_USD&compact=ultra'; response = UrlFetchApp.fetch(url); rateEURUSD_FCC_JSON = JSON.parse(response.getContentText()); rateEURUSD_FCC = rateEURPLN_...
Rafal2017
1

votes
1

answer
348

Views

Using HtmlService.createHtmlOutputFromFile vs HtmlService.createTemplateFromFile

I have a problem with my Google Apps Script. I need a responsive design app with the right title in the tab (usually declared by the tag). Using HtmlService.createHtmlOutputFromFile makes it possible to add the meta tag which makes responsive design possible: var template = HtmlService.createHtmlOu...
Sep Keuchenius
1

votes
1

answer
46

Views

How to make for loop script more efficient?

I'm very new to script writing in general, especially in GAS, and want to make sure I learn good habits. I wrote a for loop script that, in essence, does the following: Read through column A starting at row 2 If cell above current cell in for loop is the same value, then clear the contents of the ad...
Bcos
1

votes
0

answer
245

Views

no permissionas for setting Authorized JavaScript origins in google app script

i want to set my uri inside Authorized JavaScript origins but it gaves me You do not have permission to perform this action. Tracking Number: c527557048 the steps of the block of Enable APIs and credentials. Access the automatically created apps script Developer Console Project by go to your new pr...
Dodji
1

votes
1

answer
49

Views

Performance issue: 1 simple script tested on 2 spreadsheets, execution time differs (from less than 1s to 7s)

I tested a simple script on 2 different spreadsheets and the execution took less than 1 sec for the first spreadsheet and about 7 sec for the second spreadsheet (even though it's the same code). Here is the code, very basic (just retreiving a value in a sheet), used on the 2 spreadsheets: function t...
Julien
1

votes
1

answer
170

Views

How to automatically authenticate Google Drive through Docusign API

I am creating an app with Google apps script to send Docusign envelopes to customers when I receive a google form from them (with the responses going into a google sheet with an onFormSubmit trigger). I'm using the Docusign REST API envelopes method to create an envelope, and send directly to the cu...
Alex James
1

votes
2

answer
381

Views

Google Sheets Custom Function API: Return Sunrise/sunset + GMT/DST Offset based on lat/long

I'd like to have the function return the sunrise or sunset formatted with the appropriate GMT offset based on the coordinates. I found a different API that lets you get sunrise/set times for a given date and location as well as providing GMT or DST offset. function SunRiseSet(lat,long,date,type) { v...
Jeremy Bauman
1

votes
1

answer
75

Views

Server status for Google Apps Script

Hellos, I was wondering if anyone knew how to monitor server status for Google Apps Script? It seems to have gone down today, and none of my apps worked for over an hour... Looking at Google's server status page doesn't indicate any problems with Google Sheets, but this isn't the sheet itself, but r...
Laserheart
1

votes
0

answer
255

Views

Session.getActiveUser().getEmail() returns no Value

this is my first Stackoverflow Questions, so I'm trying to do my best to be clear and structured here but please forgive me for beginner mistakes :) So I'm having a little issue with the Script Editor of Google, basically I'm calling the Session.getActiveUser().getEmail() as well as the Session.getE...
Bruce McGivern
1

votes
0

answer
174

Views

Google Script XML Parsing Error: Cannot find function

I uploaded a number of XML files to my Google Drive. They are set to be shared with anyone on the web. I made a list of the links in a Google Sheet. (Picture below.) I am trying to parse the XML files using a Script from GitHub. (See below for full script.) However when I call the function in cell F...
Ike

View additional questions