Hello, and, On Extending Glide with Google Apps Script

I do what @ThinhDinh suggests. The template is a string but only used for grouping. The sorting still happens with the original date format column. Examples here:

Complicated sorts involving date and other values is a different story. If glide provided an ISO format option, then you could template that with other values, such as calculated duration to get the sort order you want. However, you could possibly subtract a seed datetime from the current datetime to get a numeric value, add the difference in event duration, then sort on that numeric value. It better yet, calculate the seed datetime from event datetime, then separately calculate duration, then template them both together. May or may not run into issues with number if digits, so might be best to add something like 10000 to each calculated result to get a consistent number of digits to the left of the decimal.

I’m not knocking the use of scripts. I use then too, but Glide can be surprisingly powerful and much more responsive if you can accomplish the same thing exclusively within glide.

If you want to play around with a concept and throw some random events at it, feel free here. It’s not perfect but I haven’t worked on it for awhile.

1 Like