sheet.sort(6, true); //will sort column six ascending (true - use false for descending)
sheet.sort(6, true); //will sort column six ascending (true - use false for descending)
....
var collector=e.parameter.collector;
sheet.appendRow([status,distance,temperature,humidity,location,date,collector]);
sheet.sort(6, true);
....
function doGet(e) { var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/1Rkv-0ZtwkeYVZbeo8zXMj3frJaFNwPuMy9tJYbrMkvA/edit#gid=0");var sheet = ss.getSheetByName("Sheet1"); Addfiles(e,sheet);
}
function doPost(e) { var ss = SpreadsheetApp.openByUrl("https://docs.google.com/spreadsheets/d/1Rkv-0ZtwkeYVZbeo8zXMj3frJaFNwPuMy9tJYbrMkvA/edit#gid=0");var sheet = ss.getSheetByName("Sheet1"); Addfiles(e,sheet);
}
function Addfiles(e,sheet) { var status=e.parameter.status; var distance=e.parameter.distance; var temperature=e.parameter.temperature; var humidity=e.parameter.humidity; var location=e.parameter.location; var date=e.parameter.date;
This also assists with sorting if the date/time is converted to a string, because they are both naturally listed e.g. 2019-03-26 -> 2019-03-27 -> 2019-03-28
MONTHhttps://spreadsheet.google.com/tq?tqx=out:csv&key=1cKxYfTQqjhga5qAcDsMJncRchdOfpFOEFtdYo9ZHFKc&gid=1121632423&tq=select * where B > date '2017-12-31' and B < date '2019-01-01' and month(B) contains 6
WEEKhttps://spreadsheet.google.com/tq?tqx=out:csv&key=1cKxYfTQqjhga5qAcDsMJncRchdOfpFOEFtdYo9ZHFKc&gid=1121632423&tq=select * where B > date '2017-04-01' and B < date '2017-04-08'
DAYhttps://spreadsheet.google.com/tq?tqx=out:csv&key=1cKxYfTQqjhga5qAcDsMJncRchdOfpFOEFtdYo9ZHFKc&gid=1121632423&tq=select * where B contains date '2018-02-04'
I fixed it by putting horizontal scroll arrangement and changing font size
sir thank you so much for so much effort you exert just to help
don't worry I always memorize and study each blocks and logics you gave me guys here
you are all the best
right now I am in the designing phase of the app
all the functions are completed since I am started asking and learning MIT app Inventor here and IoT
this was all a great time
Thank you so much!!
I will still continue learning and asking ;p
List Sorting On App Inventor and choosing the ascending or descending depending order using a bubble sort possibly.