# Logical Operators In Table Column Translation List

**URL:** <https://forum.inductiveautomation.com/t/logical-operators-in-table-column-translation-list/2692>\
**Category:** Ignition\
**Created:** [February 24, 2011, 11:58am UTC](https://forum.inductiveautomation.com/t/logical-operators-in-table-column-translation-list/2692 "2011-02-24T11:58:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![aidamcg](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@aidamcg](https://forum.inductiveautomation.com/u/aidamcg)\
**Post date:** [February 24, 2011, 11:58am UTC](https://forum.inductiveautomation.com/t/logical-operators-in-table-column-translation-list/2692/1 "2011-02-24T11:58:59Z")

</div>

Hi

I am wondering if it possible to have \<= , \>= or != etc in the background color translation list in a table. I can only get it to work when a value is equal to a value in the column.

Thanks

Aidan

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/900517b03163297ddbedd145947de4511d067f13.GIF)

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [February 24, 2011, 6:30pm UTC](https://forum.inductiveautomation.com/t/logical-operators-in-table-column-translation-list/2692/2 "2011-02-24T18:30:11Z")

</div>

We don’t have those operators right now. However, you can do the same in your SQL query. You can do something like:`SELECT CASE WHEN value <= 15 THEN 1 WHEN value > 15 THEN 2 ELSE 3 END FROM Table..`Then your background color mapping is simple. Hope this helps.

---

<div class="post-metadata">

**Author:** ![aidamcg](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@aidamcg](https://forum.inductiveautomation.com/u/aidamcg)\
**Post date:** [February 25, 2011, 8:21am UTC](https://forum.inductiveautomation.com/t/logical-operators-in-table-column-translation-list/2692/3 "2011-02-25T08:21:07Z")

</div>

Hi Travis

Thanks for reply. I have used the case feature before but it will color the entire row. It would be a nice feature if the translation list would work with relational operators. Sometime in the future maybe??

Thanks

Aidan

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [February 25, 2011, 1:09pm UTC](https://forum.inductiveautomation.com/t/logical-operators-in-table-column-translation-list/2692/4 "2011-02-25T13:09:42Z")

</div>

yes, I hope that something better is implemented so that we can color individual cells.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [March 3, 2011, 10:05pm UTC](https://forum.inductiveautomation.com/t/logical-operators-in-table-column-translation-list/2692/5 "2011-03-03T22:05:54Z")

</div>

Good idea - I’ve added a ticket for this feature

---

<div class="post-metadata">

**Author:** ![f\_jons](https://avatars.discourse-cdn.com/v4/letter/f/9fc29f/32.png) [@f\_jons](https://forum.inductiveautomation.com/u/f_jons)\
**Post date:** [March 3, 2011, 11:01pm UTC](https://forum.inductiveautomation.com/t/logical-operators-in-table-column-translation-list/2692/6 "2011-03-03T23:01:10Z")

</div>

I don’t know if you are using direct bindings or scripting to populate the table, but here is what I use when I am using scripting to populate a dataset:

```auto
<html><p style="color:rgb(%s);background-Color:rgb(%s);">%s</p></html>'%(textColor, bgColor, message)
```

Granted, using this will only color the text in the cell and the text color, not the entire cell.

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [March 4, 2011, 5:46pm UTC](https://forum.inductiveautomation.com/t/logical-operators-in-table-column-translation-list/2692/7 "2011-03-04T17:46:44Z")

</div>

> [@Carl.Gould](#):
>
> Good idea - I've added a ticket for this feature

Carl, whats the chances of more customization for cell backgrounds being made available? In particular, I would love to be able to just assign the cell background based on the alert status of the tag in each cell.

this is a competitors software, cygnet.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/1X/18dd41b02e7db2f7fb741c1b5b058b424714927c.JPG)

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [March 4, 2011, 9:33pm UTC](https://forum.inductiveautomation.com/t/logical-operators-in-table-column-translation-list/2692/8 "2011-03-04T21:33:37Z")

</div>

Well the tricky thing here is that our Table component is really general-purpose. It has no notion of the concept of a tag, so there is no “tag” associated with a row. For all it knows the data came out of a SQL database and has nothing to do with tags.

I have a vague idea for a more generalized table-like component that would let you essentially define a wide container as a “row template” that would then at runtime become duplicated X times with different values for some property. This would let you build extremely customized “tables” that could do whatever your heart desired. (As well as a host of other useful things) Still on the drafting table though.

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [March 4, 2011, 9:58pm UTC](https://forum.inductiveautomation.com/t/logical-operators-in-table-column-translation-list/2692/9 "2011-03-04T21:58:40Z")

</div>

thanks Carl. I hope you guys can get something figured out. I believe this would be a very nice feature for alot of users.
