# Hello, and, On Extending Glide with Google Apps Script

**URL:** <https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751>\
**Category:** Ask for Help\
**Created:** [October 30, 2020, 5:20am UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751 "2020-10-30T05:20:03Z")\
**Posts on this page:** 17\
**Page:** 2

<div class="post-metadata">

**Author:** ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)\
**Post date:** [February 18, 2022, 11:58am UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/21 "2022-02-18T11:58:55Z")

</div>

> [@ThinhDinh](#):
>
> You can just do the same with a Construct URL column with the params mentioned in the article above.

I’m trying to use the examples given in the article:

```auto
https://ics.agical.io/?subject=Meet%20{{company.Account Owner First Name}}&organizer=Sandy&reminder=45&location=Sandy%27s%20Desk&dtstart=2016-10-26T15:00:00-04:00&dtend=2016-10-26T16:00:00-04:00&attach=http://www.example.com/

```

Does it return a JSON?  
Apologies for these VERY basic questions. I’m new… 🙂

---

<div class="post-metadata">

**Author:** ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)\
**Post date:** [February 18, 2022, 12:00pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/22 "2022-02-18T12:00:19Z")

</div>

BTW - this tool is still asking for ISO date, which I still cannot create from the output of the “event picker”.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 18, 2022, 12:25pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/23 "2022-02-18T12:25:23Z")

</div>

You don’t need to return a JSON. Construct the URL using a Construct URL column directly, and that URL alone should work. You don’t need to fetch anything from an API, if that’s what you’re asking.

Regarding ISO, if you convert your event picker columns to a text column I think that should be enough. The underlying data written to those start and end columns is still ISO.

---

<div class="post-metadata">

**Author:** ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)\
**Post date:** [February 18, 2022, 12:40pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/24 "2022-02-18T12:40:36Z")

</div>

> [@ThinhDinh](#):
>
> Regarding ISO, if you convert your event picker columns to a text column I think that should be enough. The underlying data written to those start and end columns is still ISO.

No luck… ☹

![eventpicker](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/b/eb90e5cdacb9b938f09f1fca611c11e962cd28ab.gif)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 18, 2022, 1:12pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/25 "2022-02-18T13:12:13Z")

</div>

What happens if you point your event picker to a non-user specific text column, or create new user specific text columns. Just wondering if something is stuck because you had selected user specific date type columns initially.

---

<div class="post-metadata">

**Author:** ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)\
**Post date:** [February 18, 2022, 5:28pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/26 "2022-02-18T17:28:01Z")

</div>

> [@Jeff\_Hager](#):
>
> What happens if you point your event picker to a non-user specific text column

Same…  
 ![eventpicker2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/2/227555b7947cf7db4ed934b6605be9327f82b6a9.gif)

> [@Jeff\_Hager](#):
>
> or create new user specific text columns.

And same here as well  
 ![eventpicker3](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/d/cd279a548c6fd030975178d52d98012033edad06.gif)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [February 19, 2022, 12:09am UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/27 "2022-02-19T00:09:31Z")

</div>

Have you tried clearing the columns and start picking times again with the newly created ones?

And what do you get when you try toISOString with those?

---

<div class="post-metadata">

**Author:** ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)\
**Post date:** [February 19, 2022, 6:41am UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/28 "2022-02-19T06:41:06Z")

</div>

> [@ThinhDinh](#):
>
> Have you tried clearing the columns and start picking times again with the newly created ones?

Yes, it’s shown in [this post](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/26)

> [@ThinhDinh](#):
>
> what do you get when you try toISOString with those?

I’m not able to make them work, as I wrote here.

> [@Test\_Test](#):
>
> I can never get these code columns to work… ☹  
> The closest I got is when the output was “invalid date”.

.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 26, 2022, 10:06pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/29 "2022-02-26T22:06:38Z")

</div>

I guess I don’t understand the reasoning behind it, but if I write a date to a column that’s in a google sheet, then it will store the date in ISO format. If the column type is a date, then it’s formatted nicely. If the column type is text then it shows as ISO.

When I try to do the same thing using a glide table, then it seems to store the date in a nicely formatted way regardless if the column type is text or date.

I honestly don’t know what’s happening on the back end for there to be a difference between google sheets and glide tables. I always assumed that the ISO format was the true underlying format regardless, unless you manually typed in a date instead of using one of the pickers.

Maybe there is something deeper here and glide tables can better handle dates, so it’s being stored as a true Date data type in the database, unlike google sheets, where there is no true datatable data types, so they had to force it to store in ISO format to work around all of the weird issues we had a couple of years ago where dates stored in google sheets would get weird depending on your regional settings. In reality, google sheet columns are all just text columns and glide has to make a best guess interpretation of the data type, based on content, either automatically, or by you setting the data type in the data editor. Glide writing the ISO format was probably a workaround on glide’s part to handle that weirdness with dates back then. Glide tables are better suited for working with dates, since I assume it’s true database underneath, instead of a google sheet.

Doesn’t help with your case though. Your best bet would probably be to rebuild the ISO format yourself by using a bunch of math columns and a template column to piece the separate parts together.

---

<div class="post-metadata">

**Author:** ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)\
**Post date:** [February 27, 2022, 1:49pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/30 "2022-02-27T13:49:14Z")

</div>

> [@Jeff\_Hager](#):
>
> Glide writing the ISO format

But it seems that it is NOT written in ISO in my case, whereas you’re saying (as well as many others here) that it does write to ISO. Is there something I’m doing wrong? Something to configure?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 27, 2022, 3:18pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/31 "2022-02-27T15:18:36Z")

</div>

Like I explained above…I’m assuming you are using a glide table as opposed to a google sheet. I could not get the ISO format in a glide table. But, I could get the ISO format when writing to a google sheet. Like I said, glide tables probably handle dates differently and actually store dates as dates instead of storing dates as text, like it has to do with google sheets.

Again, you will probably have to recreate the ISO formatting yourself if you are going to keep using glide tables, or you can use a google sheet as your data source instead.

---

<div class="post-metadata">

**Author:** ![David\_Gabler](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/david_gabler/32/44332_2.png) [@David\_Gabler](https://community.glideapps.com/u/David_Gabler)\
**Post date:** [February 27, 2022, 3:26pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/32 "2022-02-27T15:26:00Z")

</div>

> [@Jeff\_Hager](#):
>
> But, I could get the ISO format when writing to a google sheet

That’s what I’ve seen also, and it has its own set of troubles when working with dates! 🙂

---

<div class="post-metadata">

**Author:** ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)\
**Post date:** [February 27, 2022, 4:04pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/33 "2022-02-27T16:04:29Z")

</div>

> [@Jeff\_Hager](#):
>
> glide tables probably handle dates differently and actually store dates as dates

I understand, but isn’t it a bug (or at least an issue) that we cannot convert this value to ISO using any of the built-in tools? Even a JS column should work, but I can’t that to covert as well  
breaking it down with math column seems like an overkill

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 27, 2022, 4:52pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/34 "2022-02-27T16:52:49Z")

</div>

ISO format was never a “feature”. It was a hack job to fix the multitude if issues that we used to have a couple of years ago, when working with dates and google sheets across multiple regions/locales.

The google sheet locale would fight with the user’s locale and totally screw up dates. Glide changed it so the ISO format would be written to the google sheet, since it’s internationally recognized. It was to fix a problem brought on by google sheets. It was not meant to be a format for the end user to view.

So, no, I don’t consider it a bug, because glide never meant for the ISO format to be something that we work with as the end user. It was to fix a back end issue.

It would help if you shared which built in tools or JS code you have attempted to use. If you didn’t want to break it down and piece an ISO timestamp together in a template, then I would think you could still reliably get away with a single math column to get a single number, and a JS column to inject the missing pieces. Either way, I don’t think it would be that big of a deal to just build out the ISO format.

---

<div class="post-metadata">

**Author:** ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)\
**Post date:** [February 27, 2022, 6:01pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/35 "2022-02-27T18:01:36Z")

</div>

> [@Jeff\_Hager](#):
>
> JS code you have attempted to use.

Higher up this post we debated which JS would work. As far as I can tell, none of these tools can accept the Glide table date as an input (p1 in the JS column).

> [@Hello, and, On Extending Glide with Google Apps Script](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/13):
>
> If it isn’t picked by date picker, maybe try toISOString.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 27, 2022, 6:35pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/36 "2022-02-27T18:35:21Z")

</div>

Here is a math column and a javascript column to build it out.  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/8/c8902338f1308f32a61b21fd21f89ff952b7edaf.png)

* * *

Use the math column to convert the date into a number.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/1/51d3c57873aadaf997cc265a01e03899d89ac883.png)

```auto
YEAR(Date)*10000000000
+
MONTH(Date)*100000000
+
DAY(Date)*1000000
+
HOUR(Date)*10000
+
MINUTE(Date)*100
+
SECOND(Date)

```

* * *

Use the javascript column to split it up and piece it together with the extra characters inserted to build the ISO format.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/2/d2c608f386609bf5a3d61ef85da4060bebb0c42d.png)

```auto
var str = p1.toString();

return str.substr(0,4) +
           '-' +
           str.substr(4,2) +
           '-' +
           str.substr(6,2) +
           'T' +
           str.substr(8,2) +
           ':' +
           str.substr(10,2) +
           ':' +
           str.substr(12,2) +
           '.000Z';

```

* * *

Unless someone knows of the math formula to pull out the milliseconds, the best I can do is get accuracy down to seconds. Hopefully you don’t need that.

---

<div class="post-metadata">

**Author:** ![Test\_Test](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/test_test/32/30930_2.png) [@Test\_Test](https://community.glideapps.com/u/Test_Test)\
**Post date:** [February 27, 2022, 8:22pm UTC](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751/37 "2022-02-27T20:22:09Z")

</div>

> [@Jeff\_Hager](#):
>
> Here is a math column and a javascript column to build it out.

That’s PERFECT!  
Thanks a million!

[Previous page](https://community.glideapps.com/t/hello-and-on-extending-glide-with-google-apps-script/17751.md?page=1)
