# Clock in and out for workers

**URL:** <https://community.glideapps.com/t/clock-in-and-out-for-workers/74971>\
**Category:** Ask for Help\
**Created:** [July 17, 2024, 5:08pm UTC](https://community.glideapps.com/t/clock-in-and-out-for-workers/74971 "2024-07-17T17:08:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Truter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/peter_truter/32/1846_2.png) [@Peter\_Truter](https://community.glideapps.com/u/Peter_Truter)\
**Post date:** [July 17, 2024, 5:08pm UTC](https://community.glideapps.com/t/clock-in-and-out-for-workers/74971/1 "2024-07-17T17:08:43Z")

</div>

Trying to make clock in and out for workers.  
I have read other peoples help topics but cannot come right Whatever I try Clock in and Clock out goes to two lines. Guess I don’t understand to well explanations so sorry .

 ![Nav](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/a/3a41d297172a5a6cb8b9718d1954cbef84b36ac0.jpeg)  
 ![Users](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/c/6c75b50c8bf433eac33fb9ce7a8018f7ac891f8d.jpeg)  
 ![timesheet](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/8/5804c23418fae0679dc9e4e9e8145465f5050961.jpeg)

My basic start. Thanks in advance for any help

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 17, 2024, 11:19pm UTC](https://community.glideapps.com/t/clock-in-and-out-for-workers/74971/2 "2024-07-17T23:19:14Z")

</div>

- Create a query in the Users table, target the Timesheet table, filter by user email is signed-in user, and “Clock In” is within today.

- Add a single value column on top of the query, choose “Whole row” & first.

- Add another single value column on top of the query, choose “Clock Out” & first.

- If the query is empty, show the Clock in button, which should add a row with the signed-in user’s email and write the current date/time to the “Clock In” column.

- If the query is not empty AND the single value \> Clock Out value is empty, show the “Clock Out” button, which use a set column action, set the current date/time to the “Clock Out” column of the single value \> whole row thing.

- Once it’s done for the day, no buttons should be shown.

---

<div class="post-metadata">

**Author:** ![Alger\_Bradley](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alger_bradley/32/63597_2.png) [@Alger\_Bradley](https://community.glideapps.com/u/Alger_Bradley)\
**Post date:** [July 17, 2024, 11:39pm UTC](https://community.glideapps.com/t/clock-in-and-out-for-workers/74971/3 "2024-07-17T23:39:39Z")

</div>

Created this very app before. Can you share what the actions are on your buttons?

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abdo/32/36540_2.png) [@abdo](https://community.glideapps.com/u/abdo)\
**Post date:** [July 18, 2024, 6:27am UTC](https://community.glideapps.com/t/clock-in-and-out-for-workers/74971/4 "2024-07-18T06:27:58Z")

</div>

Check this, could possibly help and inspire

> [@rocket Introducing ClockInPro: A Glide template to manage work time sheets clock3](https://community.glideapps.com/t/introducing-clockinpro-a-glide-template-to-manage-work-time-sheets/74951/5):
>
> Hi Andrew Currently it just creates a csv file with the data in the timesheets table from the report query. I’ve already started to update that into a PDF file that you can email or print, just didn’t want to add it to this version of the app as reports usually need to be customized.

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abdo/32/36540_2.png) [@abdo](https://community.glideapps.com/u/abdo)\
**Post date:** [July 18, 2024, 6:31am UTC](https://community.glideapps.com/t/clock-in-and-out-for-workers/74971/5 "2024-07-18T06:31:05Z")

</div>

There has to be a relation ship between the users table to the timesheets table to grab the last timesheet entry of that user.

If the last entry is Open (Clock out is empty). then the action of clock out would edit the row and set the clock out time.

If the last entry is Closed (Clockout is not empty). then you add a new row with the clock in value.

There are way other conditions you can do if you want to make this complicated…  
Make sure you are using different actions for Clock in and Clock out.

---

<div class="post-metadata">

**Author:** ![Peter\_Truter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/peter_truter/32/1846_2.png) [@Peter\_Truter](https://community.glideapps.com/u/Peter_Truter)\
**Post date:** [July 18, 2024, 3:10pm UTC](https://community.glideapps.com/t/clock-in-and-out-for-workers/74971/6 "2024-07-18T15:10:19Z")

</div>

Thank You so much for Your reply.  
Followed all steps but Sadly think I don’t understand something. [ Feeling stupid already.  
( \* If the query is empty, show the Clock in button, which should add a row with the signed-in user’s email and write the current date/time to the “Clock In” column. )

- If the query is not empty AND the single value \> Clock Out value is empty, show the “Clock Out” button, which use a set column action, set the current date/time to the “Clock Out” column of the single value \> whole row thing.) Think this is where I’m getting lost  
 ![Primary Clock in](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/b/4b9c57f3c81d5fd2339c492e8c65ca48c753e8ce.jpeg)  
 ![Secondary Clock out](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/d/4d6f3c39666324033ef745f5385d8dcfb4f3b33f.jpeg)  
 ![UserTAb](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/7/371c13db1b23812b8541a8c8e6d0cf8299521346.jpeg)  
 ![UserTAb2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/3/f/3f21a37d0b69124f09daa88a51ff7a344418f8c6.jpeg)  
 ![UserTAb3](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/9/49a8a5461cad4e5c8524637677587f2f5b151b24.jpeg)  
 ![UserTAb4](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/b/0b070d5100b3ee46ca944c7ea29180531483e621.jpeg)  
 ![timesheet](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/f/8fc4a31c0e8f0160dfa93aa3eedb5a8451d0fb64.jpeg)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 19, 2024, 12:37am UTC](https://community.glideapps.com/t/clock-in-and-out-for-workers/74971/7 "2024-07-19T00:37:13Z")

</div>

> **[Thinh's Demo - Clock In & Clock Out](https://docs.lowcode.agency/recordings/zBo6ECILTsVP6xIuzN0Y)**
>
> Summary:
> The video discusses setting up and managing a time sheet system, focusing on user IDs, clock-ins, and data queries for tracking work hours.
> 
> Chapters:
> 00:00 Introduction to Time Sheet System
> 01:00 Querying Time Sheet Data by User ID
> 02:00...

Here’s a recording for you.

---

<div class="post-metadata">

**Author:** ![Peter\_Truter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/peter_truter/32/1846_2.png) [@Peter\_Truter](https://community.glideapps.com/u/Peter_Truter)\
**Post date:** [July 21, 2024, 7:57am UTC](https://community.glideapps.com/t/clock-in-and-out-for-workers/74971/8 "2024-07-21T07:57:28Z")

</div>

Thank You so much, Your Video explained to me what needs to be done, and I got it working

---

<div class="post-metadata">

**Author:** ![Peter\_Truter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/peter_truter/32/1846_2.png) [@Peter\_Truter](https://community.glideapps.com/u/Peter_Truter)\
**Post date:** [July 21, 2024, 8:00am UTC](https://community.glideapps.com/t/clock-in-and-out-for-workers/74971/9 "2024-07-21T08:00:16Z")

</div>

**I want to thank everyone who has offered their help and guided me, So nice to have a community that wants to help.**

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 21, 2024, 9:05am UTC](https://community.glideapps.com/t/clock-in-and-out-for-workers/74971/10 "2024-07-21T09:05:30Z")

</div>

Great to hear it’s working for you!
