Time sheet

Iam trying to build/make a glide app that will have a list of all my employees where they can scroll find their name enter the time, they started their shift (or i can have it auto filled as it’s the same every day for all employees) time they had taken their breaks in and out and the time they ended their shift…

I’m new to glide so I’m trying to figure out how to do this.

They shouldn’t have to find their name. If you force them to log in, they can just record it using their profile.

I would have a setup like below:

  • A logs table that has the column: User ID, Checked in, Checked out, RowID
  • A breaks table that has the column: Log ID, Start, End

Assuming your shift doesn’t cross between 2 days:

  • Add a math column to your User Profiles table, with the formula being: YEAR(N)*10^4 + MONTH(N)*10^2 + DAY(N) with N being the “Now” value. Let’s call this “Today”.

  • Add a math column to your Logs table, with the formula being: YEAR(N)*10^4 + MONTH(D)*10^2 + DAY(D) with D being the “Checked in” value. Let’s call this “Log Date”.

  • Add a query column to your User Profiles table, target the Logs table, filter by “Log Date” equals this row > “Today”.

  • Add a button to the front end, which would only show if the signed-in user’s query is empty. That button would add a new row to the Logs table with the signed-in user’s RowID, and the current time to the “Checked in” column.

  • At this point, the query is not empty anymore. You show that to the user using a collection/custom collection, and add a button for them to check out, which would write the current time to the check out column of that same row.

  • Add another button to log breaks inside the details view of the “Log” row. An “add” button click would log a new row to the breaks table with the Log’s rowID, and the current time as the “Start” value.

  • Show the Breaks rows (make sure you create a relation for this) to the user, and add a button for them to “end” the break.

2 Likes