Hi everyone,
I’m building an Attendance app in Glide where each worker checks in and checks out daily, and the app automatically calculates their total working hours.
Here’s my current setup:
Attendance table columns include:
-
URow ID
-
User ID
-
Relation to User
-
Check In Date/Time
-
Check In Location
(Latitude, Longitude, Address)
-
Check Out Date/Time
-
Check Out Location
(Latitude, Longitude, Address)
In the morning, when a worker clicks the Check In button, a new row is added to the Attendance table with the current date/time and their location — this part is working perfectly.
In the evening, when the worker clicks the Check Out button, the app should update the same record created in the morning, adding the check-out time and location.
What I Want to Achieve:
-
When the worker clicks Check In, a new record is created in the Attendance table. 
-
When the same worker clicks Check Out, the app should:
-
Find their existing record for today (matching both User ID
and Date
).
-
Update only that record’s Check Out
time and Check Out Location
.
Where I’m Stuck:
When I try to update that specific row (today’s record) through a workflow, it always updates the top row in the Attendance table instead of the correct one.
I’m trying to perform this update using custom workflows, where I also want to record the current date/time and the current location at the moment of Check-Out.
My Question:
How can I correctly target the row that matches both the User ID and today’s date when using a workflow action (e.g., Set Columns or Write to Table)?
Is there a recommended method to ensure that only the current day’s record for the signed-in user is updated with the Check-Out data and location?
Hi Mehmet,
There are always a lot of ways to get from point A to point B in Glide, but what I think would help you is to relate the user to the attendance table using a concatenated (template) column that includes the User ID and the date in some way that only finds records from the current day.
For example, you could have a template in the user table UserID:today. Then in the attendance table you could have an if-then column that determines if the date is within today or not and set up a template based on that. The resulting values would be UserID:today or UserID:not today. Relate those two template columns and use that relation for the set column action.
You probably already have ways to prevent users from creating more than one record per day, if that’s the way your attendance tracking works. Otherwise you could make the template more specific, such as UserID:date to allow for editing more than one specific record on a given day. I like to use the X (hexadecimal) format for the date in those cases.
Create a Query column in your Users table and apply the following filters:
- UserID is This row->UserID
- Check out time is empty
You can then update the record via that Query.
You just need to decide what to do if a user forgets to check out.
1 Like
Hi Darren,
I followed your suggestion and created a Query column in the Users table. Then, I set up a custom workflow to capture the current date/time and the user’s current location using the Radar integration.
However, I’m running into an issue — in the workflow, I don’t see the option to select that specific Query column I created.
I am using Set column value
Hi Heartwood thanks for you time,
I also tried the approach you suggested, but I’m running into a couple of issues.
I created one Template column in the Attendance table and another in the Users table. When the user checks in, I need to capture the exact date, hour, and minute. In the Attendance table, this works fine — I format the captured check-in date/time as dd/mm/yyyy and use it in a template along with the User ID.
However, in the Users table, I’m struggling to match that same date format. Since I have to generate the current date there, I use a Math column with Now → Date Only, but this produces a different format.
As a result, the templates in the Users and Attendance tables don’t match, and I can’t link them properly due to the date format difference.
I’m sure Darren’s suggestion will work as well or better, but here’s how I would format the date
One important thing here is to have the date-time be exactly the same in both tables (before applying the X format). It won’t necessarily work to have a button that triggers an action that sets a date column in the users table to Current date/time, then a separate step that sets a date column in the attendance table to Current date/time. If a second or two goes by in between steps, the X formatted date won’t match. Set the user column first, then use the value from the user table column to set the attendance table. That way they will be the same, and the relationship should work.
Edit: I just looked closer at your screenshot of the Attendance table. You’ll need to set the date-time for each row when the clock in button is clicked. The way you have it, all the rows will have the same date-time.
It needs to be a Single Query. That is, make sure you don’t check the “Match multiple” box.
1 Like