# Set quality of table data cell by scripting

**URL:** <https://forum.inductiveautomation.com/t/set-quality-of-table-data-cell-by-scripting/28423>\
**Category:** Ignition\
**Created:** [September 20, 2019, 7:10am UTC](https://forum.inductiveautomation.com/t/set-quality-of-table-data-cell-by-scripting/28423 "2019-09-20T07:10:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ald](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@ald](https://forum.inductiveautomation.com/u/ald)\
**Post date:** [September 20, 2019, 7:10am UTC](https://forum.inductiveautomation.com/t/set-quality-of-table-data-cell-by-scripting/28423/1 "2019-09-20T07:10:25Z")

</div>

Is it possible to control the quality overlay of a table cell by scripting?

In my case I want to perform some data validity checks in a table where the user can edit the cell values. If the cell value is “out of range” i want the cell to have a bad quality overlay.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 20, 2019, 12:37pm UTC](https://forum.inductiveautomation.com/t/set-quality-of-table-data-cell-by-scripting/28423/2 "2019-09-20T12:37:12Z")

</div>

I’m not sure about adding a tag/component overlay to a cell, but why not just change the background fill to red when value is out of range, or something along that line?

---

<div class="post-metadata">

**Author:** ![pat.stave1](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@pat.stave1](https://forum.inductiveautomation.com/u/pat.stave1)\
**Post date:** [September 20, 2019, 1:49pm UTC](https://forum.inductiveautomation.com/t/set-quality-of-table-data-cell-by-scripting/28423/3 "2019-09-20T13:49:10Z")

</div>

Filling in for ald (my colleague).  
We did do this. The reason for the question is that we want an easy way to check if ALL the data in the table is “valid” or not.  
What we would like to do is set and reset a custom parameter “dataValid” on the table component depending on the content.

However I’m sure there are also other ways to accomplish this. If we only work with background colour of the cell then we would need a script that loops through each cell and retrieves the actual color.

What is considered best practice?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 20, 2019, 2:39pm UTC](https://forum.inductiveautomation.com/t/set-quality-of-table-data-cell-by-scripting/28423/4 "2019-09-20T14:39:47Z")

</div>

if you are binding tags to individual cells in a table, you could probably use tag expressions. Check to see if your value is within tolerance, if not use [forceQuality](https://docs.inductiveautomation.com/display/DOC79/forceQuality) to change the tag quality. Also tags have [engineering limits](https://docs.inductiveautomation.com/display/DOC79/Tag+Properties) that can enforce tag quality
