Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic flight log sorting #56

Closed
daniele-athome opened this issue Jan 28, 2022 · 4 comments
Closed

Automatic flight log sorting #56

daniele-athome opened this issue Jan 28, 2022 · 4 comments
Assignees
Labels
📒 flight-log Flight log section 🚀 enhancement New feature or request

Comments

@daniele-athome
Copy link
Owner

It would be nice if it could be done in Google Sheets directly (automatically after every modification).

@daniele-athome daniele-athome added 🚀 enhancement New feature or request 📒 flight-log Flight log section labels Jan 28, 2022
@daniele-athome daniele-athome added this to the Productization milestone Jan 28, 2022
@daniele-athome
Copy link
Owner Author

daniele-athome commented Jan 29, 2022

  • simple triggers don't work when changing sheet data via API
  • installable triggers work but you need to use the onChange event (but it's an asynchronous call, so the app would have to sleep a random amount of time to let the trigger do its job)
  • create a script that does the sorting and invoke it from the app (but script invocation can't be used with service account, it might be a bug: https://issuetracker.google.com/issues/36763096, however judging by the documentation you can't run scripts from service accounts https://developers.google.com/apps-script/api/how-tos/execute 🤔)

API execution: https://developers.google.com/apps-script/api/how-tos/execute

@daniele-athome
Copy link
Owner Author

Another alternative could be using a read-only sheet that queries another write-only sheet, sorting it:

https://webapps.stackexchange.com/a/69385/96655

=QUERY(A1:C3,"SELECT * ORDER BY C")  

@daniele-athome
Copy link
Owner Author

Implemented as a Google Apps Script automated trigger on sheet change. Source code will be collected when I will work on #32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📒 flight-log Flight log section 🚀 enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant