# Column Binding Based on Another Column Same Row

**URL:** <https://forum.inductiveautomation.com/t/column-binding-based-on-another-column-same-row/98569>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 13, 2024, 3:51pm UTC](https://forum.inductiveautomation.com/t/column-binding-based-on-another-column-same-row/98569 "2024-11-13T15:51:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Subin\_Adhikari](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Subin\_Adhikari](https://forum.inductiveautomation.com/u/Subin_Adhikari)\
**Post date:** [November 13, 2024, 3:51pm UTC](https://forum.inductiveautomation.com/t/column-binding-based-on-another-column-same-row/98569/1 "2024-11-13T15:51:10Z")

</div>

Gurus,

What's the best way to achieve this ?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/5/05b490da44890099ab7bcbc8391e78d92536c615.png)

I want to enable/disable the checkbox based on the same row column value.  
according to the image posted, i want "From Something" to be based on "Something"

My colleague pointed me the to the lookup function ([lookup | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/logic/lookup)) which seems to work but was wondering if there is something better to achieve this.

Regards.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 13, 2024, 3:59pm UTC](https://forum.inductiveautomation.com/t/column-binding-based-on-another-column-same-row/98569/2 "2024-11-13T15:59:06Z")

</div>

Generate a True or False in the query populating the table.

Show us how you are generating the table data. If SQL then post your query ([Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831)).

---

<div class="post-metadata">

**Author:** ![Subin\_Adhikari](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Subin\_Adhikari](https://forum.inductiveautomation.com/u/Subin_Adhikari)\
**Post date:** [November 13, 2024, 4:27pm UTC](https://forum.inductiveautomation.com/t/column-binding-based-on-another-column-same-row/98569/3 "2024-11-13T16:27:42Z")

</div>

@Transistor to be more clear on my question,

1. According to the value of another column I should decide if the column is editable or not.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 13, 2024, 4:29pm UTC](https://forum.inductiveautomation.com/t/column-binding-based-on-another-column-same-row/98569/4 "2024-11-13T16:29:50Z")

</div>

I understood that from your original post. Show us how you are generating the table data.

---

<div class="post-metadata">

**Author:** ![Subin\_Adhikari](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@Subin\_Adhikari](https://forum.inductiveautomation.com/u/Subin_Adhikari)\
**Post date:** [November 13, 2024, 4:38pm UTC](https://forum.inductiveautomation.com/t/column-binding-based-on-another-column-same-row/98569/5 "2024-11-13T16:38:57Z")

</div>

```python
select something,from_something from ABC

```

where from\_something is a boolean  
and something is a string.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [November 13, 2024, 4:50pm UTC](https://forum.inductiveautomation.com/t/column-binding-based-on-another-column-same-row/98569/6 "2024-11-13T16:50:56Z")

</div>

I had a similar problem a few years ago. I don't remember what the outcome was but my posts on [Perspective table disable editing on certain rows](https://forum.inductiveautomation.com/t/perspective-table-disable-editing-on-certain-rows/52016) may give you some ideas. You might need to return a hidden column. e.g.,

```python
SELECT 
    something, 
    from_something 
    from_something AS canEdit
FROM ABC

```

and use that hidden value to decide whether or not a row can be edited.
