Re: [Apps-Script] Digest for google-apps-script-community@googlegroups.com - 24 updates in 9 topics

225 views
Skip to first unread message

Jaya Lakshmi

unread,
Jul 30, 2022, 3:37:01 AM7/30/22
to google-apps-sc...@googlegroups.com
Hi.....i want to save the multiple rows of data from one sheet to another sheet and also after saving ,want to clear the content in the source sheets but keep the formula in Google sheets..using script....
Thanks & Regards
Jaya 

On Sun, Jul 24, 2022, 3:15 PM <google-apps-sc...@googlegroups.com> wrote:
Clark Lind <cwl...@gmail.com>: Jul 23 05:39AM -0700

As Paul mentioned, your best option is to restructure your UI. If you have
more than 100 input fields for example, then break the input data into
logical groupings with each grouping having its own card.
If you are displaying information or photos or something, just display the
maximum you can including Headings, section headings, etc, and add a "Next"
button to call the next card...
Cards and Card Service is very strict, similar to G-Forms, there is only so
much you can do within the framework provided.
 
Fahad Sulaiman <fah...@ienterprises.com>: Jul 24 12:33PM +0530

but if i created new card, then previous form data will be removed...how to
handle that..
 
Paul Armstrong <paul.ar...@section6.nz>: Jul 23 08:00PM -0700

Hi
 
I can not find anything that says that private functions are not supported
by app-script, but it appears they are not. As per this example:
 
class Test {
static test() {
return Test.#test2();
}
static #test2() {
return "tested";
}
}
Test.test();
 
This code will not save. I get an Unexpected token ILLEGAL error, at the
first line it encounters a # on.
 
Thanks!
ShiizophreN <showdo...@googlemail.com>: Jul 23 08:52PM -0700

It works. When referencing the class through the Apps Script library, it
has to be var x = new LibraryName.ClassName();
 
Paul Armstrong <paul.ar...@section6.nz>: Jul 23 09:06PM -0700

Hi
Thanks for your answer.
I am not particularly familiar with Javascript. Can you please expand on
your answer a little?
Do I still use # to identify private functions? It take it not, but then
how?
 
Thanks!
 
Andrew Roberts <and...@roberts.net>: Jul 24 07:47AM +0100

If you define the following object you get a private function.
 
const obj1 = (function(ns) {
ns.publicFunction = function() {
privateFunction()
}
return ns
function privateFunction() {
// Do something private
}
})({})
 
obj1.publicFunction() // OK
obj1.privateFunction() // Error
 
On Sun, 24 Jul 2022 at 05:06, Paul Armstrong <paul.ar...@section6.nz>
wrote:
 
"marka...@gmail.com" <marka...@gmail.com>: Jul 23 10:53PM -0700

I'm hoping someone can tell me why this saveAndClose code that has not
been changed in months is suddenly getting this error:
 
[22-07-23 22:41:04:664 PDT] TypeError: Cannot read property 'saveAndClose'
of undefined
at ProcForms(Code:372:12)
 
I went to run the script today and have gotten this error repeatedly. Below
is the section of code in the script where this error is being flagged and
this is the only saveAndClose statement in the script. I don't see what is
wrong and why it suddenly gets this error when this exact code has been
working until today and has not been changed.
 
//Make a copy of the template file and store in the appropriate subfolder.

var folder = DriveApp.getFolderById(sfid);
var mimetyp = DriveApp.getFileById(fileId).getMimeType() ; // Get the
document MimeType to see if file is a PDF/JPEG
var documentId = DriveApp.getFileById(fileId).makeCopy(pcode + ' ' +
form, folder).getId();
if (mimetyp == 'application/pdf' || mimetyp == 'image/jpeg') continue ;
// If document is a PDF or JPEG then do no further processing after copy.
var copyDoc = DocumentApp.openById(documentId);

//Get the document body as a variable and replace variables with agent
values or blanks.
var ninfo = PropertiesService.getScriptProperties().getProperty("ninfo")
if(ninfo == 'no') {
var body = DocumentApp.openById(documentId).getBody();
body.replaceText('##First##' , fname) ;
body.replaceText('##Last##' , lname) ;
body.replaceText('##mobile##' , mobile) ;
body.replaceText('##dre##' , dre) ;
body.replaceText('##emaddr##', emaddr) ;
body.replaceText('##sep##' , '||') ;
body.replaceText('##apos##' , "'s") ;
}
else {
if(ninfo == 'yes') {
var body = DocumentApp.openById(documentId).getBody();
body.replaceText('##sep##' , ' ') ;
body.replaceText('##First##' , ' ') ;
body.replaceText('##Last##' , ' ') ;
body.replaceText('##mobile##' , ' ') ;
body.replaceText('##dre##' , ' ') ;
body.replaceText('License #' , ' ') ;
body.replaceText('##apos##' , ' ') ;
body.replaceText('DRE' , ' ') ;
}
}
}
copyDoc.saveAndClose(); <== This is statement 372
 
An help would be appreciated. Thanks
 
Mark
ShiizophreN <showdo...@googlemail.com>: Jul 23 11:44PM -0700

try this
 
function test(){
var folder = DriveApp.getFolderById(sfid);
var mimetyp = DriveApp.getFileById(fileId).getMimeType() ; // Den
MimeType des Dokuments abrufen, um zu sehen, ob die Datei eine
PDF/JPEG-Datei ist
var documentId = DriveApp.getFileById(fileId).makeCopy(pcode + ' ' +
form, folder).getId();
if (mimetyp == 'application/pdf' || mimetyp == 'image/jpeg')
Continue ; // Wenn das Dokument ein PDF oder JPEG ist, dann keine weitere
Verarbeitung nach dem Kopieren.
var copyDoc = DocumentApp.openById(documentId);

//Den Dokumentkörper als Variable abrufen und Variablen durch
Agentenwerte oder Leerzeichen ersetzen.
var ninfo = PropertiesService.getScriptProperties().getProperty("ninfo")
if(ninfo == 'no'){
var body = DocumentApp.openById(documentId).getBody();
body.replaceText('##First##' , fname) ;
body.replaceText('##Letzte##' , lname) ;
body.replaceText('##mobile##' , mobil) ;
body.replaceText('##dre##' , dre) ;
body.replaceText('##emaddr##', emaddr) ;
body.replaceText('##sep##' , '||') ;
body.replaceText('##apos##' , "'s") ;
}
else if(ninfo == 'yes') {
var body = DocumentApp.openById(documentId).getBody();
body.replaceText('##sep##' , ' ') ;
body.replaceText('##Erster##' , ' ') ;
body.replaceText(' ##Letzte##' , ' ') ;
body.replaceText('##mobile##' , ' ') ;
body.replaceText('##dre##' , ' ') ;
body.replaceText('Lizenz #' , ' ') ;
body.replaceText('##apos##' , ' ') ;
body.replaceText('DRE' , ' ') ;
}
copyDoc.saveAndClose();
}
 
Andrew Roberts <and...@roberts.net>: Jul 24 07:42AM +0100

If you convert your script into an Add-on and install it privately (so you
don't have to go through the verification process) and unlisted just you
will see it on all your GSheets.
 
On Sat, 23 Jul 2022 at 21:36, Keith Andersen <keith.a...@gmail.com>
wrote:
 
ShiizophreN <showdo...@googlemail.com>: Jul 23 10:15PM -0700

function onEdit(e) {

var sheet = SpreadsheetApp.getActiveSpreadsheet(); // Variable für das Dokument
var member = sheet.getSheetByName('Damon'); // Variable für das Tabellenblatt Mitglieder
var row = member.getDataRange().getLastRow(); // Variable der letzten Zeile
var columns = ['R','R6'];
var steuerFrei = `=SUM(1500*AD${row})+(P${row}*(index(Datenblatt!$A$1:$J$38;Match(O${row};Datenblatt!$A$1:$A$38;0);4)))`;
var steuern = `=SUM(1500*AD${row})+(P${row}*(index(Datenblatt!$A$1:$J$38;Match(O${row};Datenblatt!$A$1:$A$38;0);5)))`;
 
columns.forEach((item) => {
var range = member.getRange(item + row);
if (item == columns[0] && range.getColumn() == 21 && range.getValue() == "Steuerfrei") {
range.setValue(steuerFrei);
}
})
}
ShiizophreN <showdo...@googlemail.com>: Jul 23 09:14PM -0700

First Trigger with time trigger on midnight
[image: 1.png]
 
second trigger with time trigger on midnight
[image: 2.png]
 
next time trigger with time trigger on midnight
[image: 3.png]
ShiizophreN schrieb am Samstag, 23. Juli 2022 um 18:39:15 UTC+2:
 
james cui <james.c...@gmail.com>: Jul 23 07:51PM -0700

Hey guys,
 
I was trying the Youtube Data API today and wanted to download captions of
some videos, but couldn't make it work. Here is what I did, I picked a
popular video and listed all captions, and then I picked the caption id
that translated to English. It throws at YouTube.Captions.download call no
matter what format parameter I use. Here is the detailed error
"GoogleJsonResponseException:
API call to youtube.captions.download failed with error: Unsupported Output
Format" Did anyone encounter this issue? Any advice to resolve this?
 
 
function myFunction() {
var ret = YouTube.Captions.list(['id,snippet'], 'M7FIvfx5J10');
console.log(ret);
 
var obj = new Object();
obj['tlang'] = 'en';
obj['tfmt'] = 'ttml';
//sbv – SubViewer subtitle
//scc – Scenarist Closed Caption format
//srt – SubRip subtitle
//ttml – Timed Text Markup Language caption
//vtt – Web Video Text Tracks caption
var ret1 = YouTube.Captions.download('8yMV7mc691aTqjNxZ9zPHOdwpkL_e11j',
obj);
 
console.log(ret1);
}
Tin Balbalosa <tin.ba...@gmail.com>: Jul 24 08:58AM +0800

Thank you for your response. I've done it as such, the form and script does
work if I've only set it up to as single reference. B2 and J2, but whenever
I try to add last row trigger, it no longer works. I want it to trigger for
every last row on the submitted response but I have difficulty doin so.
Here's the last script it was modified to
 
function setUpTrigger(){
 
ScriptApp.newTrigger('LOOKUP')
.forForm('11jqQgzXiCT0XH8fAlfFS8y3_XgdY69L5QfoHAFwW0rk')
.onFormSubmit()
.create();
 
}
 
function LOOKUP() {
const ss = SpreadsheetApp.getActiveSpreadsheet()
const wsLogsheet = ss.getSheetByName ("Respondent Log")
const wsLimit = ss.getSheetByName("Limit")
const limitData= wsLimit.getRange(2,1,
wsLimit.getLastRow()-1,3).getValues()
const searchValue =
wsLogsheet .getRange(wsLogsheet.getLastRow(),2).getValue();
const matchRow = limitData .find(r => r[0] == searchValue)
const match = matchRow ? matchRow[2]: null
wsLogsheet.getRange(wsLogsheet.getLastRow(),10).setValue(match);
 
 
Connor Sheffield <con...@atscale.org>: Jul 23 04:25PM -0500

So should it look like this then?
 
Edward Ulle <thew...@gmail.com>: Jul 23 02:53PM -0700

Yes, does it run without error?
 
 
On Saturday, July 23, 2022 at 2:25:47 PM UTC-7 Connor Sheffield wrote:
 
Connor Sheffield <con...@atscale.org>: Jul 23 04:56PM -0500

If i it to onOpen with the dropdown menu next to run then it gives me the
error you saw, if I set it to track it goes like this.
 
Edward Ulle <thew...@gmail.com>: Jul 23 03:00PM -0700

If you didn't close and reopen or rerun onOpen from the script editor its
still the old menu "tracker". Otherwise from script editor track looks
like it ran okey. Do you see the status in the spreadsheet?
 
On Saturday, July 23, 2022 at 2:56:38 PM UTC-7 Connor Sheffield wrote:
 
Connor Sheffield <con...@atscale.org>: Jul 23 05:16PM -0500

Thank you for taking all the time to help out and explain this to me!
 
I went into Apps Script, made sure it was all saved and closed and reopened
the program. I went ahead and found a package we're shipping via UPS, and
entered the info in. I made sure on the home page that the script was
attached to the right spreadsheet.
 
The first screenshot is from the debug menu for onOpen and the second is
from clicking run on it. The third and fourth are the debug and run for
track. I feel like I must just be making some kind of dumbass mistake here
and I cannot figure it out, and the last few are the results and double
checking the script.
 
<cbmserv...@gmail.com>: Jul 23 03:19PM -0700

Connor,
 

 
The function name is track. So when you assign script to the button, use the name track (don’t use Tracker).
 

 

 
From: google-apps-sc...@googlegroups.com <google-apps-sc...@googlegroups.com> On Behalf Of Connor Sheffield
Sent: July 23, 2022 3:16 PM
To: google-apps-sc...@googlegroups.com
Subject: Re: [Apps-Script] Re: Complete beginner looking for answers on package tracking script
 

 
Thank you for taking all the time to help out and explain this to me!
 
I went into Apps Script, made sure it was all saved and closed and reopened the program. I went ahead and found a package we're shipping via UPS, and entered the info in. I made sure on the home page that the script was attached to the right spreadsheet.
 
The first screenshot is from the debug menu for onOpen and the second is from clicking run on it. The third and fourth are the debug and run for track. I feel like I must just be making some kind of dumbass mistake here and I cannot figure it out, and the last few are the results and double checking the script.
 

 
On Sat, Jul 23, 2022 at 5:00 PM Edward Ulle <thew...@gmail.com <mailto:thew...@gmail.com> > wrote:
 
If you didn't close and reopen or rerun onOpen from the script editor its still the old menu "tracker". Otherwise from script editor track looks like it ran okey. Do you see the status in the spreadsheet?
 
On Saturday, July 23, 2022 at 2:56:38 PM UTC-7 Connor Sheffield wrote:
 
If i it to onOpen with the dropdown menu next to run then it gives me the error you saw, if I set it to track it goes like this.
 

 
On Sat, Jul 23, 2022 at 4:53 PM Edward Ulle <thew...@gmail.com <mailto:thew...@gmail.com> > wrote:
 
Yes, does it run without error?
 

 
On Saturday, July 23, 2022 at 2:25:47 PM UTC-7 Connor Sheffield wrote:
 
So should it look like this then?
 

 
On Sat, Jul 23, 2022 at 4:11 PM <cbmserv...@gmail.com <mailto:cbmserv...@gmail.com> > wrote:
 
Fedex seems to have a nicely documented api. Here is the link to it if you feel up to programming that in.
 

 
Track API Documentation | FedEx Developer Portal <https://developer.fedex.com/api/en-us/catalog/track/v1/docs.html>
 

 

 
From: google-apps-sc...@googlegroups.com <mailto:google-apps-sc...@googlegroups.com> <google-apps-sc...@googlegroups.com <mailto:google-apps-sc...@googlegroups.com> > On Behalf Of Edward Ulle
Sent: July 23, 2022 2:08 PM
To: Google Apps Script Community <google-apps-sc...@googlegroups.com <mailto:google-apps-sc...@googlegroups.com> >
Subject: Re: [Apps-Script] Re: Complete beginner looking for answers on package tracking script
 

 
My bad in the menu item i put "tracker" but the function name is "track" change "tracker" to "track"
 
On Saturday, July 23, 2022 at 2:02:32 PM UTC-7 Connor Sheffield wrote:
 
Man, I know it's not a lot but tonight on our call I am absolutely going to say thank you and tell my staff this only happened because you were willing to help me so much.
 
Here is what I did and here are the results.
 

 
On Sat, Jul 23, 2022 at 3:31 PM Edward Ulle <thew...@gmail.com <mailto:thew...@gmail.com> > wrote:
 
Note that you don’t need to deploy. This can be used as a shared spreadsheet with a bound script. Any one with the link and edit access can edit the sheet and run the script.
 
On Saturday, July 23, 2022 at 1:28:27 PM UTC-7 George wrote:
 
Edward is correct. This script is awfully inefficient as it calls getValue on same cells many times and the number of calls to spreadsheet functions imbedded inside a for loop will make this very slow to run if the spreadsheet grows to any decent size.
 

 
I watched the demo also, the fetchFedex function was not shown, but it appeared they may have had it if they had bothered to scroll down. The YouTube video is pretty badly done..
 

 
On Sat., Jul. 23, 2022, 1:22 p.m. Edward Ulle, <thew...@gmail.com <mailto:thew...@gmail.com> > wrote:
 
I made some corrections to the script you provided. You are missing function fetchFedEx. You can run from the script editor or I've added a menu item so you can run from spreadsheet. Also this assumes there is only one sheet. I don't have any tracking number to test it with so I hope it works for you. If possible show me any Execution log errors.
 

 
I wouldn't have done it with all the getCell(), getValue() calls but I left them so as not to confuse you.
 

 
function onOpen() {
 
let ui = SpreadsheetApp.getUi();
 
let menu = ui.createMenu("Package Tracker");
 
menu.addItem("Run Tracker","tracker");
 
menu.addToUi();
 
}
 

 
function track() {
 
try {
 
Logger .log("Start processing sheet....")
 
var ss = SpreadsheetApp.getActive();
 
var range = ss.getDataRange() // getting data range
 
var rowEnd = range. getLastRow(); // index of last row
 
var columnEnd = range. getLastColumn(); // index of last column
 

 
for(var i = 3; i <= rowEnd; i++) { //skip 2, ignore column titles
 
Logger.log("Processing row: " + i + "/" + rowEnd);
 
// getting values of all 4 columns
 
var ups = range.getCell(i, 1); // getting cell A. i represents row# and 1represents column A
 
var ups_status = range.getCell(i, 2); // getting cell B. i represents row# and 2 represents column B
 
var fedex = range.getcell(i, 3); // getting cell C. i represents row# and 3 represents column C
 
var fedex_status = range.getCell(1, 4); // getting cell D. 1 represents row# and 4 represents column D
 

 
// check if row has no tracking id then stop the process
 
if( ( ups.getValue() == "" ) && ( fedex.getvalue() =="" ) ) {
 
break; // do the next tracking number
 
}
 

 
// check if UPS has tracking id with missing status then get the status and update
 
if( ( ups.getValue() != "" ) && ( ups_status.getValue().toLowerCase() != "delivered" ) ) {
 
var url = "https://wwwapps.ups.com/tracking/tracking.cgi?tracknum="+ups.getValue();
 
ups_status.setFormula('=IMPORTXML("'+ url +'", "//*[@id=\'tt_spStatus\']")');
 
}
 

 
// check if Fedex has tracking id with missing status then get the status and update
 
// Comments out for now
 
//if( ( fedex.getValue() != "" ) && ( fedex_status.getValue(). toLowerCase() != "delivered" ) ) {
 
// var status = fetchFedex(fedex.getValue()); // where is function fethcFedex ?
 
// fedex_status.setValue(status);
 
// }
 
}
 
}
 
catch(err) {
 
Logger.log(err);
 
}
 
}
 

 

 
On Saturday, July 23, 2022 at 12:17:48 PM UTC-7 Connor Sheffield wrote:
 
This would be for an individual person to use: basically the goal is for the order manager ( who is always the same person) to have access to the spreadsheet to be able to input order tracking numbers and follow along. And no, I couldn't and I reached out and got no response back, so I can't even ask them what I did wrong LOL. I tried to just follow their format, so let me leave what I have so far, including links to my spreadsheets and and script. I just tried to copy it from the video and fix mistakes as they came up.
https://docs.google.com/spreadsheets/d/1zaIsFY7wrPyHi9yU6qcf4_hG-DjU3FLvhbsNp53mVvs/edit?usp=sharing I think that link should work and lead to what I have been doing.
 
And I just want to take a second and again thank you for all your help, I genuinely am completely new at this and am just trying to make things work, and having anyone else help has been amazing.
 

 
On Sat, Jul 23, 2022 at 1:57 PM Edward Ulle <thew...@gmail.com <mailto:thew...@gmail.com> > wrote:
 
The video doesn't tell me much about what you have so far and where you are going with this.
 

 
1) Is this a corporate workgroup or are these just individual Google users trying to access your spreadsheet and script?
 

 
2) I couldn't find a link to their spreadsheet and script. Do you have these?
 

 

 
On Saturday, July 23, 2022 at 10:44:02 AM UTC-7 Connor Sheffield wrote:
 
Thank you so much for your response! Let me try and answer them as best I can, but this is not my area of expertise, and I apologize in advance for my lack of skills.
 

 
I want to use this to track our office supply shipments across multiple offices, including when we start new ones. We have a master list of supplies to order depending on office size, and once we've made the order I want to be able to input the tracking info from either Fedex or UPS and have it track and give updates. For something like this, what would you suggest I do?
 

 
I tried to follow this video (https://www.youtube.com/watch?v=GFZyXEEDrCA <https://www.youtube.com/watch?v=GFZyXEEDrCA&ab_channel=CommittoLearn> &ab_channel=CommittoLearn) but I clearly failed to do so correctly.
 

 
I really am grateful for your help and answers so far, and I really apologize for not knowing this.
 
On Saturday, July 23, 2022 at 12:16:12 PM UTC-5 thew...@gmail.com <mailto:thew...@gmail.com> wrote:
 
Too many questions about what your are trying to do.
 

 
1) Is this a standalone app script file or a spreadsheet bound script. By bound script I mean is it included in the same file as the spreadsheet.
 

 
2) If a stand alone you once you've deployed it the spreadsheet that calls the library need to add it as a library.
 

 
3) You have a function in a function. How is myFunction called and it would have to be preceeded by the library name.
 

 
Function definition:
 

 
function myFunction() {
 
function track() {
 
};
 
}
 

 
Function access:
 

 
PackageTracker.myFunction()
 

 
But then within myFunction you need to call track. Say for example
 

 
function myFunction() {
 
function track() {
 
};
 
track();
 
}
 

 
And of course you need to provide shared access to the spreadsheet.
 

 

 
On Saturday, July 23, 2022 at 9:40:02 AM UTC-7 Connor Sheffield wrote:
 
Hello!
 

 
I am building a program that is meant to track packages from two different companies. I wrote this script, but can't seem to get it to deploy and am a complete noob at this. After making the script, I tried to set it up so that other members of my org could access it, so I tried to set it as a library. Afterwards, I entered my sheets and tried to get it to load by creating a button that when pressed runs the script. Whenever I try though, it is unable to find it. Is the issue that I need to fully flesh out the spreadsheet, in the sense that I need to create all the columns and rows? I am sure this is a dumb question for everyone here so I really thank you for your time!
 

 
Here is the deployment ID AKfycbw3kmVSzKvQ8DeDUGW51iKYCClIUeMGtQsBak84KJmmnH1v1xdAKQCcAVWSBETHgmO3
 
Here are a few screenshots <https://groups.google.com/group/google-apps-script-community/attach/cc78698678854/Screenshot%20(3).png?part=0.1&view=1>
 
<https://groups.google.com/group/google-apps-script-community/attach/cc78698678854/Screenshot%20(6).png?part=0.2&view=1>
 

 
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/k4JKWbNu_x8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com <mailto:google-apps-script-c...@googlegroups.com> .
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/56311c8a-c800-4007-ae5d-89744e58eee4n%40googlegroups.com <https://groups.google.com/d/msgid/google-apps-script-community/56311c8a-c800-4007-ae5d-89744e58eee4n%40googlegroups.com?utm_medium=email&utm_source=footer> .
 
--
 
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com <mailto:google-apps-script-c...@googlegroups.com> .
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/d7d682e3-2837-47dc-962c-d7b9cfc36d10n%40googlegroups.com <https://groups.google.com/d/msgid/google-apps-script-community/d7d682e3-2837-47dc-962c-d7b9cfc36d10n%40googlegroups.com?utm_medium=email&utm_source=footer> .
 
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/k4JKWbNu_x8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com <mailto:google-apps-script-c...@googlegroups.com> .
 
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/1dabac6f-2f47-4067-91b4-acd12572df62n%40googlegroups.com <https://groups.google.com/d/msgid/google-apps-script-community/1dabac6f-2f47-4067-91b4-acd12572df62n%40googlegroups.com?utm_medium=email&utm_source=footer> .
 
--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com <mailto:google-apps-script-c...@googlegroups.com> .
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/f492770e-9a10-4700-a2d8-c443240216e3n%40googlegroups.com <https://groups.google.com/d/msgid/google-apps-script-community/f492770e-9a10-4700-a2d8-c443240216e3n%40googlegroups.com?utm_medium=email&utm_source=footer> .
 
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/k4JKWbNu_x8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com <mailto:google-apps-script-c...@googlegroups.com> .
 
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/002001d89ed8%24c2c8e560%24485ab020%24%40gmail.com <https://groups.google.com/d/msgid/google-apps-script-community/002001d89ed8%24c2c8e560%24485ab020%24%40gmail.com?utm_medium=email&utm_source=footer> .
 
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/k4JKWbNu_x8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com <mailto:google-apps-script-c...@googlegroups.com> .
 
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/dac01f64-6d4b-48eb-8358-49796bc59da9n%40googlegroups.com <https://groups.google.com/d/msgid/google-apps-script-community/dac01f64-6d4b-48eb-8358-49796bc59da9n%40googlegroups.com?utm_medium=email&utm_source=footer> .
 
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/k4JKWbNu_x8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com <mailto:google-apps-script-c...@googlegroups.com> .
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/bd8808e0-5c0c-4436-b503-ee2218d75d0fn%40googlegroups.com
Edward Ulle <thew...@gmail.com>: Jul 23 03:23PM -0700

First screen. If you are running debugger and are breakpoint at first line
nothing has been defined yet.
 
Screen 2 & 3. The function should be "track"
 
Screen 4 & 5. You are running onOpen in debug. I think that won't work.
 
 
On Saturday, July 23, 2022 at 3:16:46 PM UTC-7 Connor Sheffield wrote:
 
Connor Sheffield <con...@atscale.org>: Jul 23 05:34PM -0500

Wow, that should have been so clear, I am so sorry. This is my first time
(literally have never tried this before but when your bosses say do it or
else am I right?) trying to do something like this, and so I am sorry for
all the beginner's mistakes I made to get here! Y'all have been so
helpful!!
I went ahead and modified that and tried to track a package! And it sorta
works!
 
I input a tracking number that I know is valid, hit run and it came back
with this. I double checked the tracking info and went to UPS and tracked
it there and it shows it's "on it's way" but the column fills in with N/A,
any ideas what I have done wrong again? And again, I am so thankful for all
this advice and teaching, hopefully when they eventually ask me to add USPS
to this I will be better LOL.
 
Edward Ulle <thew...@gmail.com>: Jul 23 03:37PM -0700

If I had a valid tracking number for FedEx there is UrlFetch() and
Utilities.parseXML() that could be used to extract the status. I did it
for an old tracking number but it was delivered long ago and so the fedex
status was not available. But please don't give out anything like that on
this web site.
 
On Saturday, July 23, 2022 at 3:23:00 PM UTC-7 Edward Ulle wrote:
 
Edward Ulle <thew...@gmail.com>: Jul 23 03:39PM -0700

Like I said the UPS method is brute force using IMPORTXML. I don't know if
the query works. I get NA for an old UPS tracking number but I thought it
was because it was so old.
 
On Saturday, July 23, 2022 at 3:37:09 PM UTC-7 Edward Ulle wrote:
 
Connor Sheffield <con...@atscale.org>: Jul 23 03:44PM -0700

No thank you for catching that no idea why I sent the number, I will try
and figure out why it isn't returning a date!
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to google-apps-script-c...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages