improve the ordering of json or pretty html data in the email #380

Closed
opened 2025-10-14 16:57:37 -06:00 by navan · 0 comments
Owner

Originally created by @mckennapsean on 1/27/2017

The spreadsheet has an implicit ordering based on the headers. The email just gets a random order, I think because the underlying data is scraped and put into a Javascript array (which is not ordered by default). As a result, if we prettify the email like in #74 , then the order will be based on the input data.

We could order data in the email based on the form data, or the spreadsheet data. I think it is best to have it be MOST flexible to the data someone uses in their form, as it is a lot easier to tweak and add form elements in HTML than in a Google Spreadsheet (and live changing columns could result in loss of data...). But this is a bit of an opinion I wanted to start a discussion on first, to see what others think. :)

One challenge for this tutorial and approach is that you can change a lot of things right now, the spreadsheet, the Google script code (and saving/publishing it appropriately), the Javascript code, or your form in HTML, plus you can also be just sending an email or do both email & the spreadsheet. It is complex. Anyways, with many points of entry and of updating, it gets tricky for someone to walk through the tutorial.

*Originally created by @mckennapsean on 1/27/2017* The spreadsheet has an implicit ordering based on the headers. The email just gets a random order, I think because the underlying data is scraped and put into a Javascript array (which is not ordered by default). As a result, if we prettify the email like in #74 , then the order will be based on the input data. We could order data in the email based on the form data, or the spreadsheet data. I think it is best to have it be MOST flexible to the data someone uses in their form, as it is a lot easier to tweak and add form elements in HTML than in a Google Spreadsheet (and live changing columns could result in loss of data...). But this is a bit of an opinion I wanted to start a discussion on first, to see what others think. :) One challenge for this tutorial and approach is that you can change a lot of things right now, the spreadsheet, the Google script code (and saving/publishing it appropriately), the Javascript code, or your form in HTML, plus you can also be just sending an email or do both email & the spreadsheet. It is complex. Anyways, with many points of entry and of updating, it gets tricky for someone to walk through the tutorial.
Sign in to join this conversation.
No labels
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
Priority-1
awaiting-review
awaiting-review
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
chore
chore
discuss
discuss
discuss
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
epic
epic
external-dependency
external-dependency
external-dependency
hacktoberfest-accepted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
help wanted
in-progress
in-progress
in-progress
in-review
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
merge-conflicts
merge-conflicts
please-test
please-test
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
question
spam
spam
starter
starter
starter
starter
starter
starter
starter
starter
starter
technical
technical
technical
technical
technical
user-feedback
user-feedback
user-feedback
user-feedback
user-feedback
user-feedback
wontfix
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/learn-to-send-email-via-google-script-html-no-server#380
No description provided.