Hello! I am new here and have a lot to learn. I am from Brazil, so forgive me if I make any grammatical error.
I made this app AppSheet.
But I think that most of its resources is a workaround. I would like to ask for you help me to make it more clean and fast.
The idea: My objective is to register Time in and out of the employees of my little business. The register will be made by an NFC tag written with an URL. This URL will pass the parameter (Employee name) to a google spreadsheet with a function doGet of Apps Script. The app is for the employee to view its times and edit if needed. The spreadsheet have a tab for each employee, and each line of the sheet is a day of the year.
How it is working now: All employees can see each other data, its not yet filtered by employee, this is not a problem for now. The first view the user must choose which employee to see its data, then the year and then the month. On the last view its shown the times of that employee for the chosen year and month.
How I made it:To filter the data I have created three additional tabs on my spreadsheet, one for the employee name, one for the year and another for the month. When the user chooses the name, year, month it’s written at respectives tabs, then I created a slice of the data according to the information written. Example: The names are in the column B when the user chooses the name it is copied to the column A on the respective row (Action used: Data: set the values of some columns in this row). On the spreadsheet a script triggered by Onchange identifies where the change was made and copy the value to the A2 cell and erases all other data of the column A. This way I filter using the expression ANY() on the Appsheet. This is the same process for name, year and month. This is the expression: AND(YEAR([DATA])=ANY(Tab[Column]), MONTH([DATA])=ANY(Tab[Column]))
Everything is working, but it`s slow because every option that the user have must be written to the spreadsheet, so on every view change it must be synced. I disabled the delayed sync because sometimes the user got at the last view and the data was not filtered yet.
Is there a better way to filter the data?
Is there a easier way for the user to choose year and month? The ideal is that on the times view would be possible for the user choose the year and month.
Thanks in advance! And sorry for the long text. I hope someone have the patience to read it and help me.