# Data backgroundColor style

**URL:** <https://forum.inductiveautomation.com/t/data-backgroundcolor-style/45517>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 13, 2021, 6:06am UTC](https://forum.inductiveautomation.com/t/data-backgroundcolor-style/45517 "2021-04-13T06:06:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![james.beeley](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.beeley/32/28019_2.png) [@james.beeley](https://forum.inductiveautomation.com/u/james.beeley)\
**Post date:** [April 13, 2021, 6:06am UTC](https://forum.inductiveautomation.com/t/data-backgroundcolor-style/45517/1 "2021-04-13T06:06:03Z")

</div>

I want a table to colour rows based on the priority and acknowledgement status of the alarm. I’m unable to use an Alarm Status Table because I want to set the headings.

I have implemented a Table with a script to populate data. The script gives each row a background colour. Data populates successfully, and an example is below.

 ![Untitled](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/1/0186ccb127dc85f98b43dcc6ac0761c5a8db08cf.png)

However, the rows don’t change colour. I’m unable to find that colour listed anywhere in my external debugger. Why isn’t it coming through?

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [April 13, 2021, 7:19am UTC](https://forum.inductiveautomation.com/t/data-backgroundcolor-style/45517/2 "2021-04-13T07:19:17Z")

</div>

Hi @james.beeley, the format of the data is slightly incorrect. You need to put all your values into a “value” object and then have a style object as it’s sibling. Something like this:

```auto
[
  {
    "value": {
      "displayPath": "FK",
      "id": 1,
      "someCol": 3
    },
    "style": {
      "backgroundColor": "#FF8000"
    }
  },
  {
    "value": {
      "displayPath": "FK",
      "id": 2,
      "someCol": 5
    }
  }
]

```

---

<div class="post-metadata">

**Author:** ![iscrac](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/iscrac/32/49757_2.png) [@iscrac](https://forum.inductiveautomation.com/u/iscrac)\
**Post date:** [April 13, 2021, 7:44am UTC](https://forum.inductiveautomation.com/t/data-backgroundcolor-style/45517/3 "2021-04-13T07:44:48Z")

</div>

I have almost the same table)) I mean I don’t use the Ignition Alarm Table.  
So… this is how I append data to the Table (this is a part of my Script… this is for You to see how I did it):

```auto
data = []
data.append({"selected":{'value':False,'style':{'background':'#FFFFFF'}}, "Group":group, "style":style,"id":id_item, "displayPath": displayPath_item, "priority":priority_item, "priorityOrdinal":priorityOrdinal_item, "state":state_item, "stateOrder":stateOrder_item, "timestamp":timestamp_item, "timestampMS":timestampMS_item, "value":eventValue_item, "ack":ack_item})

```

Matthew is right)

---

<div class="post-metadata">

**Author:** ![james.beeley](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.beeley/32/28019_2.png) [@james.beeley](https://forum.inductiveautomation.com/u/james.beeley)\
**Post date:** [April 14, 2021, 12:27am UTC](https://forum.inductiveautomation.com/t/data-backgroundcolor-style/45517/5 "2021-04-14T00:27:09Z")

</div>

Both great answers, thank you for your time
