Delete row when timer hits 0

Hi all,

just wondering if the following is achievable…

I have created a timer that counts down from x to 0 mins, is there a way to trigger an action eg; delete row when the timer hits 0?

No. Actions can only be initiated by a user. If it’s in a google sheet, you could set up a google script to handle the delete.

Otherwise, you can simply hide the row once the time has passed.

thanks for responding Jeff.

The data is on a glide-table and due to sync delay issues across devices it needs to continue to be on a glide-table :confused:

1 Like

I expect you could play with the visibility of a component, e.g. state that something is in/visible for as long as Now is > StartTime + X seconds.

1 Like

Thanks, I get that you can un/hide, but in my case is a little more complicated than that.

I’m working on a jobs queue system for Drivers.

When a Driver views a job a row to a glide-table is created with the date/time the Driver opened the job, via relations and roll-ups, the very first Driver is allowed 5 mins (hence the timer) to either Accept or Release the job back to the queue. Since I can’t safely rely on the Driver to religiously Release the job, when the timer hits 0 I’d like to be able to delete that row so that the next Driver gets an opportunity to asses the job.

I know using google-sheets is achievable via scripting etc. but is not as effective due to the sync issues between glide-google and across all Driver devices. Hence why the use of glide-table is imperative.

Ok - you cannot trust the current user to check the status. But that’s OK. You should simply automate the check when the next user interacts with the App.

BUT all this could all be avoided if you stopped creating temporary rows in a separate sheet. Instead, work with all your jobs in 1 sheet then have a Date/Time column that shows when a job was last viewed. Your list of available jobs can then be filtered by jobs that have a Time entry that is not less than 5 minutes. This will make any job vanish from user’s screens if it is opened/viewed by another person.

Only when a job is accepted should you delete the job from the main list and create a new row in a different sheet with the new owner.

The best way to do it, is to create user-specific columns for temporary data, any user can work on these and when accepted, have an action to add a row and set columns with data from US columns… this method has also one more plus… if the user comes back there, whatever he fill up is still there… unless you don’t want that, then clear values when going there.
click this SAMPLE

Screen Shot 2021-07-15 at 6.20.09 AM

1 Like

Not sure I agree Uzo. With a user specific column a job’s status will not show up for other users, e.g. as someone opens a job to check for interest…

it will… because you will add row to non user specific columns… USC is only for temporary use… ones they submit… action… add row with values from USC

Why would you add a row to non specific column when you can set column? Just set the time and the user email? I think you are adding unnecessary complexity.

Hello.
Wouldn’t it help you to cancel the queue?
When the driver views the job, the row with date / time is created.
It would make a TEMPLATE column with the current date time.
I would make another column where the driver ACCEPTS or NO.
It would do another IF-THEN-ELSE column, when the timer reaches zero, if it was not ACCEPTED it is RETURN IN QUEUE.

Thanks all for your suggestions and feedback…your suggestions for accepting a job can work one way or another fine.

But my issue is more a sync issue across devices.

Since all the jobs are on a google-sheet, whether you write the Date/Time value, the Email of the owner or use user-specific columns there is a massive delay to replicate those values written to the google-sheet across all devices for any un/hide conditions to work well.

Hence, the best approach I have found thus far is to have temporary rows on a glide-table, as any values that have been written there are near-instantly replicated across all devices and hence hide/unhide conditions work well.