How to Automatically Update Previous row value

Hi everyone,

I’m building a Crane Log app in Glide, where users from multiple sites and cranes need to log their start and end times for each lift they do with the crane. I’m trying to automate the following process:

  1. When a user completes a crane log, the system should create a new row with the status “Available to Start” after the End Time of the completed log.
  2. When the user starts a new log, the End Time of the previous “Available to Start” row should be updated to the Start Time of the new log.

Here’s the problem:

  • I need to ensure that the “Available to Start” row is updated only for the current user and site (for example, for “Site A - John Doe”), not for all users or sites.
  • Glide’s Relation column lets me find logs for a specific user and site, but I’m struggling to automatically update the End Time of the “Available to Start” row for each user/site combination.

I’ve tried using a combination of Relations and Actions, but I’m unsure how to correctly filter the rows and trigger the updates.

What I need help with:

  • How to find the last “Available to Start” row based on the user and site.
  • How to update the End Time of the correct “Available to Start” row when the user starts a new log.

Any insights or solutions to achieve this would be greatly appreciated!

Thank you in advance for your help!

Assuming you have a structure like this in your Users table.

RowID Username Site name
U001 John Doe Site A
U002 James Doe Site B

Then you can do a query to your logs table, filtering out the last row that matches the user name and the site name. This might require an extra single value column that takes the “whole row” value for the last row.

Then, as the user clicks “complete”, you will set the current time to the “End Time” of that row, and add a new row with the status being “Available to Start” and set the current time to the “Start Time” of that row.

Though, what would happen if they end their shift on that day? Wouldn’t that start time be incorrect if they start their next shift on the next work day?

1 Like

Thank you very much @ThinhDinh, I apreciate your help. I will do that.
You are right about the last log of the day, it will show me available all night. Do you see any fix for this?

Do you have a “Start” button for those users?

I don’t think i understand your question but I’ll show you how it looks and what it does.



So wouldn’t you just need to not set the start time ahead of time?

Like you can allow them to submit that form, and only when they submit that form, you record the start time as the “current” time?