google-apps-script

Communicate from server to client side in Google Apps script

不想你离开。 提交于 2021-02-04 13:50:48
问题 I am trying to write a Google Apps script which has a client and server side component. The client side component displays a progress bar. The client calls server side functions (which are called asynchronously), whose progress has to be shown in the client side progress-bar. Now, what I want is to be able to update the client side progress bar based on feedback from the server side functions. Is this possible? The complexity is created due the the fact that JS makes the server-side calls

Values are correct and within range but still sends an email

时间秒杀一切 提交于 2021-02-04 08:37:08
问题 I have a Upper Limit and Lower Limit on my spreadsheet responses that I input towards the right of my responses. The limits are both on F2 and G2. F2 is Lower Limit and G2 is Upper Limit. The code is using the function onFormSubmit and it has an MailApp.sendEmail function that will send an email in case someone enters a figure that is out of the limit. What I do not understand that, the value that I read when the form is submitted is actually within the range but it still triggers an email. I

How to pass file upload blob from HTML form to server-side Apps Script?

狂风中的少年 提交于 2021-02-04 08:36:46
问题 The Google support article example under the Forms heading is broken. From the article: If you call a server function with a form element as a parameter, the form becomes a single object with field names as keys and field values as values. The values are all converted to strings, except for the contents of file-input fields, which become Blob objects. I tested this by passing a Form element containing 5 text inputs and a file, then logging Object.keys() on the form object. It returned only

Gmail Add-on pass parameters to function triggered by card action

醉酒当歌 提交于 2021-02-04 08:36:23
问题 I'm building a Gmail add-on that creates a card with just one form button. Once clicked, I want the button to trigger a function that will send the open email's content to an external API. So far, I have something like this: function createCard(event) { var currentMessage = getCurrentMessage(event).getBody(); var section = CardService.newCardSection(); var submitForm = CardService.newAction() .setFunctionName('callAPI'); var submitButton = CardService.newTextButton() .setText('Submit')

How to enable not authorized users to protect the spreadsheet

∥☆過路亽.° 提交于 2021-02-04 08:35:09
问题 In our team we have the following scenario: we're using a google spreadsheet with some protected areas (mainly formulas that must not be overridden - only the "admin", in our case it's me, can edit them). The other input fields are unprotected. Every team member can enter their data. At some point in time (end of the sprint), our project managers need to report the numbers from the spreadsheet. To ensure that the numbers do not get changed afterward, they want to look at the entire sheet. For

How to copy value from one column to another on Google Sheets?

我是研究僧i 提交于 2021-02-04 08:32:14
问题 Is there any formula or script to copy only values (not formulas) from one column to another?. I don't want to use CTRL + SHIFT + V because I need this to be automatic. For example: Column A Column B Value1 Value2 Value3 All the values of column A are calculated with an array formula, I need that everytime that column A has a new record the value passes to column B for ever, so if the value or formula in column A is deleted the copied value remains in column B, is it possible to do this?

How to copy value from one column to another on Google Sheets?

南笙酒味 提交于 2021-02-04 08:32:09
问题 Is there any formula or script to copy only values (not formulas) from one column to another?. I don't want to use CTRL + SHIFT + V because I need this to be automatic. For example: Column A Column B Value1 Value2 Value3 All the values of column A are calculated with an array formula, I need that everytime that column A has a new record the value passes to column B for ever, so if the value or formula in column A is deleted the copied value remains in column B, is it possible to do this?

Move Row to Other Sheet Based on Cell Value

断了今生、忘了曾经 提交于 2021-02-04 08:27:25
问题 I have a sheet with rows I'd like to move to another sheet based on a cell value. I tried following this post's solution (refer below), but I'm having trouble editing the script towards what I want it to do. I'm doing Check-Ins for an event. I would like to be able to change the value in Column F, populate Column G with the time the status changed, and for the row data to migrate to the Attendee Arrived sheet. I believe the script already does this, but one has to run it manually. It also

How to retrieve list of shareable links?

依然范特西╮ 提交于 2021-02-04 08:23:26
问题 For the following, all files are in Google Sheet format . My problem : My work environment is structured as follows ( folders / sub-folders ): RACINE : --> ID4522 --> ID7852 --> ID5864 --> .... The tracking file "FOLLOW_UP" is located in the RACINE folder. The ID4522, ID7852 and ID5864 folders are subfolders of the RACINE folder. We find in the ID4522 sub-folder the following Google sheet file "Entry_Form_ID4522", in the ID7852 sub-folder the following Google sheet file "Entry_Form_ID7852",…

Display PDF viewer inside the Google Apps Script Dialog

我们两清 提交于 2021-02-04 08:21:20
问题 I want to display a PDF inside a Dialog of a Google Spreadsheet Add-on Dialog. more about apps script dialog can be found here https://developers.google.com/apps-script/guides/html/ <iframe id="iframe" src="https://www.w3docs.com/uploads/media/default/0001/01/540cb75550adf33f281f29132dddd14fded85bfc.pdf" frameborder="0" height="500px" width="100%"></iframe> When I inspect, I see the message Resource interpreted as Document but transferred with MIME type application/pdf: "https://www.w3docs