# Set Column Values targetting the first row of the table

**URL:** https://community.glideapps.com/t/set-column-values-targetting-the-first-row-of-the-table/62438
**Category:** Ask for Help
**Created:** [June 4, 2023, 6:13pm UTC](https://community.glideapps.com/t/set-column-values-targetting-the-first-row-of-the-table/62438 "2023-06-04T18:13:23Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![JozeSin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jozesin/32/73279_2.png) [@JozeSin](https://community.glideapps.com/u/JozeSin)
#### Post date: [June 4, 2023, 6:13pm UTC](https://community.glideapps.com/t/set-column-values-targetting-the-first-row-of-the-table/62438/1 "2023-06-04T18:13:23Z")

</div>

Dear Gliders

First timer using the action “set column value”

I am doing a office-tasks tracker app , with a table “RECORDS” that, records,  
office-tasks , and adds the start time ( with the action “add row” )

My problem is that when i finish the task, i need to put the END time-stamp  
For this I use “set column value” but the time stamp data is always written to the FIRST ROW of my table. How come?

I checked the GLIDE DOCS and it says

“The Set Column Values action allows you to change another row’s values.  
It can change values in the current row or a row linked by a Relation and you can use any kind of value. Learn more about value types here.”

Well, to me , it looks like “Set column values” action only changes the first row! not the current, or the last .

I have made a workaround by displaying all he open jobs with a collection, then the user clicks the open ones (= no END timestamp) and then Set Column Values works fine, because “this item” is exactly the row .

Could you please help , how to properly use SET COLUMN VALUE ? Why the first row of my table is being always targeted? Is there any way i can redirect the value to another row? or any row i would like for that matter?

Bets regards

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/1/514bcab8071dfae01bdc262e1ce11e3f6b08fcc2.png)

---

<div class="post-metadata">

### Author: ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)
#### Post date: [June 4, 2023, 6:59pm UTC](https://community.glideapps.com/t/set-column-values-targetting-the-first-row-of-the-table/62438/2 "2023-06-04T18:59:07Z")

</div>

> [@JozeSin](#):
>
> For this I use “set column value” but the time stamp data is always written to the FIRST ROW of my table. How come?

That’s expected behavior. By default you will be connected to the first row of the table.

> [@JozeSin](#):
>
> It can change values in the current row or a row linked by a Relation and you can use any kind of value.

If you want to change the value in a row other than the first row you want to create a SINGLE relation and use that relation for the ‘row’ in your set column values.

> [@JozeSin](#):
>
> My problem is that when i finish the task, i need to put the END time-stamp

I try to think of ways to prepare the value ahead of time.

E.g. Now+30 in a math column would give me 30 days from the current time… I could use that when I submit something

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [June 4, 2023, 11:38pm UTC](https://community.glideapps.com/t/set-column-values-targetting-the-first-row-of-the-table/62438/3 "2023-06-04T23:38:38Z")

</div>

> [@JozeSin](#):
>
> For this I use “set column value” but the time stamp data is always written to the FIRST ROW of my table. How come?

Can you show us where you are putting the button that contains the action?

---

<div class="post-metadata">

### Author: ![JozeSin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jozesin/32/73279_2.png) [@JozeSin](https://community.glideapps.com/u/JozeSin)
#### Post date: [June 5, 2023, 1:48am UTC](https://community.glideapps.com/t/set-column-values-targetting-the-first-row-of-the-table/62438/4 "2023-06-05T01:48:36Z")

</div>

Thank you Eric for the advice. I need to start learning relations then! Could you please advise any guided- through example on the web to learn on how to create a single relation and use that relation to point to the row in your set column values? Again, thank you very much!

---

<div class="post-metadata">

### Author: ![JozeSin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jozesin/32/73279_2.png) [@JozeSin](https://community.glideapps.com/u/JozeSin)
#### Post date: [June 5, 2023, 2:07am UTC](https://community.glideapps.com/t/set-column-values-targetting-the-first-row-of-the-table/62438/5 "2023-06-05T02:07:11Z")

</div>

Hello ThinhDinh

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/5/65e41427553716c5021dd5b2d59e6efaea681f8f.png)

The “choice” box allows the user to pick some job from a Jobs table ( like, read email, check stocks existences, visit customer ) . This job is stored in the users table. when you click in “Iniciar” (start the job) the following action is started : ADD ROW to JobRecordTable , where you set the Job name ( pulled from User table ) and also set the Start time stamp . So far ok, the thing is, that i wanted, with the same click , to start the new JOB , “close” the previous job ( put Timestamp in the END column of the previous entry ) for this i used SET COLUMN VALUES , but always put the timestamp in the first row.

Glide allows for many workarounds and the fastest prototyping i have ever seen , so i did the following 🙂

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/2/e248f9578444d9affed11cadb89355bf6d63bd46.png)

After you click START , the added job is shown in a collection ( shows only all jobs open, END timestamp empty ). The START button is hidden ( same condition) . Then the user has to click the “job” and this generates an action “set column value” that , since is ligated to this collection item, it targets to the desired column ( looks here is the relation Mr Eric was mentioning ) When you click , the job is timestamped and return to the origin

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/2/d296671f3d9fe11d59987dd85fc97ea4c1bf6db9.png)

I need to do two click, but it is fine for my team , in the end you get some reports. The idea behind this is to see where the most time is spend in the office, see if it makes sense, or not, and how can we speed up, doing more, with same resources, or where to invest more heacount

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/f/2ff43dfb1b7e5053b906b23a1fa8a8f4e75b1744.png)
