# Reading one cell in a table and comparing it to another in the same row

**URL:** <https://forum.inductiveautomation.com/t/reading-one-cell-in-a-table-and-comparing-it-to-another-in-the-same-row/115018>\
**Category:** Ignition\
**Tags:** perspective, ignition81\
**Created:** [April 11, 2026, 4:13am UTC](https://forum.inductiveautomation.com/t/reading-one-cell-in-a-table-and-comparing-it-to-another-in-the-same-row/115018 "2026-04-11T04:13:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scadafan](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@scadafan](https://forum.inductiveautomation.com/u/scadafan)\
**Post date:** [April 11, 2026, 4:13am UTC](https://forum.inductiveautomation.com/t/reading-one-cell-in-a-table-and-comparing-it-to-another-in-the-same-row/115018/1 "2026-04-11T04:13:35Z")

</div>

I have a table which is pulling a db table to it, I need to look at column B and if it has a 1 make column A red what would be the best way to do this within the table

---

<div class="post-metadata">

**Author:** ![Cose\_Peter1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cose_peter1/32/79174_2.png) [@Cose\_Peter1](https://forum.inductiveautomation.com/u/Cose_Peter1)\
**Post date:** [April 11, 2026, 7:41am UTC](https://forum.inductiveautomation.com/t/reading-one-cell-in-a-table-and-comparing-it-to-another-in-the-same-row/115018/2 "2026-04-11T07:41:15Z")

</div>

You need to use script transform in your query binding and compare the values on each column and assign background color depending on it.  
You can find few examples here.

> **[Styling Rows Based on Values | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.3/appendix/components/perspective-components/perspective-display-palette/perspective-table/styling-rows)**
>
> This page includes examples detailing different ways to style rows based on values using Script Transforms. Each example accomplishes similiar results through different binding and data types to change the background color of a row or individual...

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [April 11, 2026, 8:09am UTC](https://forum.inductiveautomation.com/t/reading-one-cell-in-a-table-and-comparing-it-to-another-in-the-same-row/115018/3 "2026-04-11T08:09:23Z")

</div>

This a common question for Vision users switching to Perspective. A fundamental difference between their table implementations is that Perspective requires you to embed cell styling **within** the table data (as nested mappings) while Vision requires you to supply styling **external to the data** via separate configuration and/or special method calls.

This paradigm extends nearly everywhere in comparisons between Perspective components and Vision components.
