2014년 12월 6일 토요일

lists and persistent data

Ive been stuck on how to do this for months, just have skipped over this functionality for now.

Have a timesheet app for my employees.  Need to save date, employee name, job, clock in time and out time and total time worked.  I have all these calculations working and saving to tinywebdb 5\ally enter this info.  Also, client app need to utilize this information both in and out.

There is a manager app to do administration  and a client app to actually enter the info automatically.

Again, the client app currently does work just not to include the functionality needed above.



Have you thought of using fusion tables instead of a tinyWebdb? Tutorial: http://appinventor.mit.edu/explore/ai2/pizzaparty.html
And, it is not clear at all to me how your two apps communicate. Maybe you could post some screenshots of blocks that explain this.



Its like make quiz take quiz.  I thought of fusion tables, just havent been able to find good easy explanations.  Would i have one table for each person?



Think of a fusion table as a spreadsheet. Do the pizza party tutorial!
Would you have a separate sheet for each employee? Then yes. But this is really inconvenient if you have many employees and often have new employees or leaving ones. Probably you want one table with columns for name, date,  start time, end time etc.
The question is also, what you want to do with the information. Pay according to hours worked? Find out how many vacation days an employee still has?



I would want to import data based on each name AND date.  So isit possible to do this? To import rows based on two criteria from two columns?  Basically, i dont want to import all info from one name as this will give all data stored for that name, or from one date, as potentially could have data from all names.



Import what from where to where??
From the client phones into the fusion tables??
I would assume that in the fusion table you would have all data for all dates and all names. One row in the table per name for a specific date.
I would assume too, that each client phone would have data for one specific name. The client phone could then periodically upload its data into the fusion table.
Then, with your administrator app, you could do queries to find out for each name how much he has worked on a specific day, in a week, or whatever. You can also find out who has worked on a specific day, or hour, or whatever. Lots of possibilities, but I have no clue what you really want to do with your data for what purpose.

This said, fusion tables is not easy to start with if you have no knowledge about databases, so you would need to do some studying.



What i meant was aquery based on two columms data to filter the rest of the data in the rows.

Filter#1 = name
filter#2 = date

Returns all data for those filters.
Can this be done?



If name=..... and date=.....then return data



Sure.




SELECT * FROM <tableid>
WHERE date = <selected date> AND 'employee name' = <selected employee name>

first do the Pizza Party tutorial to learn how to work with fusiontables


댓글 없음:

댓글 쓰기