# Color formating in a table based on value contained

**URL:** <https://forum.inductiveautomation.com/t/color-formating-in-a-table-based-on-value-contained/15564>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [October 4, 2017, 11:46am UTC](https://forum.inductiveautomation.com/t/color-formating-in-a-table-based-on-value-contained/15564 "2017-10-04T11:46:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jfrantz](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@Jfrantz](https://forum.inductiveautomation.com/u/Jfrantz)\
**Post date:** [October 4, 2017, 11:46am UTC](https://forum.inductiveautomation.com/t/color-formating-in-a-table-based-on-value-contained/15564/1 "2017-10-04T11:46:37Z")

</div>

Looking to format a cell based on the value contained. For instance: if the value is \<15 or \>25 format background to Red.

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [October 4, 2017, 11:51am UTC](https://forum.inductiveautomation.com/t/color-formating-in-a-table-based-on-value-contained/15564/2 "2017-10-04T11:51:59Z")

</div>

I assume you’re using a regular table (not a powertable), then you can just right click on the table, go to table customisers, and check out the “Background Color Mapping” tab.

It should be pretty self explanatory: use a red background as “low fallback”, then use white for \>= 15, and use red again for \>= 25.

---

<div class="post-metadata">

**Author:** ![Jfrantz](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@Jfrantz](https://forum.inductiveautomation.com/u/Jfrantz)\
**Post date:** [October 4, 2017, 12:40pm UTC](https://forum.inductiveautomation.com/t/color-formating-in-a-table-based-on-value-contained/15564/3 "2017-10-04T12:40:49Z")

</div>

Correct not a power table.  
New to the colormapping… How do I limit the color change to only a specific cell and not the whole row? I have different limits on a few cells also. Is it possible to do in Ignition?  
For instance: Cell A limits 15-25 Cell B limits 150-200.

Can Limits be set within the background color list? like \>15 or \<25 or is it only very specific numbers/words?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 4, 2017, 3:25pm UTC](https://forum.inductiveautomation.com/t/color-formating-in-a-table-based-on-value-contained/15564/4 "2017-10-04T15:25:17Z")

</div>

Color mapping on the standard ‘Table’ component is for the entire row, must be driven by a numeric property, and is strictly a `>=` for each ‘case’ - it’s designed to be easy to set up, rather than infinitely flexible.

If you need more advanced control then you can use the Power Table and the `configureCell` extension function - which will be called once for every cell in the table, allowing you full customization. I’d recommend starting with this knowledgebase article for more detail:  
[https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/109/0/working-with-power-table-extension-functions#configureCell](https://support.inductiveautomation.com/index.php?/Knowledgebase/Article/View/109/0/working-with-power-table-extension-functions#configureCell)
