# Updating Time Tracking Table from Tasks View

**URL:** https://community.glideapps.com/t/updating-time-tracking-table-from-tasks-view/75800
**Category:** Ask for Help
**Created:** [August 22, 2024, 6:59pm UTC](https://community.glideapps.com/t/updating-time-tracking-table-from-tasks-view/75800 "2024-08-22T18:59:29Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jonovd](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jonovd](https://community.glideapps.com/u/jonovd)
#### Post date: [August 22, 2024, 6:59pm UTC](https://community.glideapps.com/t/updating-time-tracking-table-from-tasks-view/75800/1 "2024-08-22T18:59:29Z")

</div>

Hi Glide Community,

I’m building an app where users can log time against tasks. I have three tables: Tasks, Users, and Time Tracking. Users should be able to start and stop time tracking on a task from the Tasks view. The time tracking entries are stored in a separate Time Tracking table.

Here’s what I’m trying to achieve:

1. **Start Tracking** : When a user starts tracking time, a new row is added to the Time Tracking table with the task\_id, user\_id, and start\_time. (This can be done with an Action on the button easily)

2. **Stop Tracking** : When the user stops tracking time, the corresponding row in the Time Tracking table should be updated to include the end\_time.

The challenge I’m facing is that in the Tasks view, I can’t directly set columns in the Time Tracking table. I’ve tried using relations and various workarounds, but still can’t get this working.

Does anyone have any suggestions or best practices for handling this kind of time tracking scenario in Glide? Any help or pointers would be greatly appreciated

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [August 22, 2024, 7:28pm UTC](https://community.glideapps.com/t/updating-time-tracking-table-from-tasks-view/75800/2 "2024-08-22T19:28:51Z")

</div>

- Add a Query column to your Tasks table, target it at your Time Tracking table and apply two filters:  
— task\_id is This row-\>task\_id  
— user\_id is User Profile-\>user\_id
- then add a Single Value column, target it at the Query column, and select First-\>Whole row

You should then be able to Set Column values via the Single Value column.

---

<div class="post-metadata">

### Author: ![jonovd](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jonovd](https://community.glideapps.com/u/jonovd)
#### Post date: [August 22, 2024, 7:40pm UTC](https://community.glideapps.com/t/updating-time-tracking-table-from-tasks-view/75800/3 "2024-08-22T19:40:51Z")

</div>

Amazing, that worked… mostly…! I still don’t really know how.

One constraint is that a user can track time multiple times on a task (so could create 3 or 4 time\_tracking rows), but this is only updating the first row. The other constraint is that multiple users can track time on a particular task. I think your solution might cater for that, but I need to test.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [August 22, 2024, 7:59pm UTC](https://community.glideapps.com/t/updating-time-tracking-table-from-tasks-view/75800/4 "2024-08-22T19:59:54Z")

</div>

You can add another filter to the Query so that it matches the row where the end time is empty.

And yes, it will work for multiple users.

---

<div class="post-metadata">

### Author: ![jonovd](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jonovd](https://community.glideapps.com/u/jonovd)
#### Post date: [August 22, 2024, 8:23pm UTC](https://community.glideapps.com/t/updating-time-tracking-table-from-tasks-view/75800/5 "2024-08-22T20:23:53Z")

</div>

🤯 🤯 🤯

Amazing, thank you Darren! Legend.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [August 29, 2024, 8:24pm UTC](https://community.glideapps.com/t/updating-time-tracking-table-from-tasks-view/75800/6 "2024-08-29T20:24:31Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
