Cant update following row - Check in/Check out

Hey everyone,

I’m new to Glide and working on an attendance app. Here’s a brief overview:

  • I have a Users table with dummy data (Row ID, Name, Email).
  • Attendance table to record clock-in and clock-out times.

My issue:

  • I’ve set up buttons for Clock In and Clock Out.
  • When I clock in and out, the first row updates correctly.
  • But subsequent clock-in/ clock-out create new rows without updating the corresponding clock-out time.



I’ve tried using switches for this, but can’t find the option to add actions.

Feels like I’m missing something so any help would be appreciated!

Thanks.

What do your button actions look like. Typically the first button would be an add row action and the second button would be a set column action that sets a value through a relation or single value to the last row.

This is the Clock In Button:

And thats the Clock Out:

Why do I need a relation in this case? since I’m already working on the attendance table?

You added a row but your screen is still sitting on the first row. The Set Column action is going to update the row that the screen is attached to, which is most likely the first row. You may be able to set a filter on the screen so it attaches to the last row based on the filter, once the new row is added, but a single relation column or a Single Value → Whole Row column can get you there too, and you just need to change the source in the Set Column action to that relation.

To help clarify first, which table is that screen attached to? The user table or the attendance table?

1 Like

I was working on the attendance table - which was a more problematic way. Managed to figure it out by changing to the User table and then adding a row to the attendance table at the clock out action. Much obliged!

1 Like