# Assign values to columns in specific row(s) based on user selection

**URL:** https://community.glideapps.com/t/assign-values-to-columns-in-specific-row-s-based-on-user-selection/76375
**Category:** Ask for Help
**Tags:** actions, layout, data-editor
**Created:** [September 14, 2024, 3:08pm UTC](https://community.glideapps.com/t/assign-values-to-columns-in-specific-row-s-based-on-user-selection/76375 "2024-09-14T15:08:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MindBridge](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mindbridge/32/60406_2.png) [@MindBridge](https://community.glideapps.com/u/MindBridge)
#### Post date: [September 14, 2024, 3:08pm UTC](https://community.glideapps.com/t/assign-values-to-columns-in-specific-row-s-based-on-user-selection/76375/1 "2024-09-14T15:08:26Z")

</div>

Hello Gliders!

Is there a way to write to a specific row of a data table i.e. _after_ filtering on the basis of user selection?

I am trying to create a screen for the admin to be able to edit the morning/evening timings here once the admin user has selected the branch and the day they want to edit.  
I tried variety of different ways but either I manage to (i) edit and overwrite the first row in the table or (ii) add a brand new row. Struggling to find and edit the right row based on the 2-variables (branch & day).

My data table looks like this →

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/5/a586915a786e548d94a12f4651a0ab73f97aaac4.jpeg)  
(the open and close in the screenshot is in minutes - borrowing from @Loqode’s technique!

So in this example, if I wanted to edit the timings for Thursday for Borivali-MCF Branch - how should I setup my screen? Can I even do this?

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [September 14, 2024, 4:15pm UTC](https://community.glideapps.com/t/assign-values-to-columns-in-specific-row-s-based-on-user-selection/76375/2 "2024-09-14T16:15:06Z")

</div>

If you can create a single Relation, or a Query followed by a Single Value → Whole Row, that points to a specific row, then you can set column values through that related row.

---

<div class="post-metadata">

### Author: ![MindBridge](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mindbridge/32/60406_2.png) [@MindBridge](https://community.glideapps.com/u/MindBridge)
#### Post date: [September 14, 2024, 4:56pm UTC](https://community.glideapps.com/t/assign-values-to-columns-in-specific-row-s-based-on-user-selection/76375/3 "2024-09-14T16:56:08Z")

</div>

Thanks @Jeff_Hager, I have something like that in the form of the “Branch-Day Key” however how do I dynamically let users write to the row using this key?

I guess an alternate is to first write the user made changes in a different table and then run the query to update the right row?

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [September 14, 2024, 5:16pm UTC](https://community.glideapps.com/t/assign-values-to-columns-in-specific-row-s-based-on-user-selection/76375/4 "2024-09-14T17:16:51Z")

</div>

Like I said, if you can create a relation using that key to a specific row in the other table, then a Set Column action can write values through that relation. You could also directly open an Edit screen via the relation.
