# Ui-table in conjunction with ui-table handler

**URL:** https://discourse.nodered.org/t/ui-table-in-conjunction-with-ui-table-handler/56554
**Category:** General
**Created:** [12 January 2022 22:49 UTC](https://discourse.nodered.org/t/ui-table-in-conjunction-with-ui-table-handler/56554 "2022-01-12T22:49:30Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![Christian-Me](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/christian-me/32/10774_2.png) [@Christian-Me](https://discourse.nodered.org/u/Christian-Me)
#### Post date: [14 January 2022 00:29 UTC](https://discourse.nodered.org/t/ui-table-in-conjunction-with-ui-table-handler/56554/5 "2022-01-14T00:29:37Z")

</div>

Hi .... Yes This can be done.

It was in my 1st table you can find in the examples. This is the HTML Version (look into column `BOOST_STATE-value`

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/5/25a2f405d55c21caa3376608e079fa84e0db2132.png)

but the more elegant way to do:

- you will need a formatter callback [more here](http://tabulator.info/docs/4.3/format#format-custom)
- I use a function node as an editor and the copy paste it into the visual JSON editor (to escape all inverted commas) CTRL-A + CTRL-V

```auto
var customFormatter = function (cell, formatterParams, onRendered) {
    //cell - the cell component
    //formatterParams - parameters set for the column
    //onRendered - function to call when the formatter has been rendered

    let value = cell.getValue();
    let color = 'orange';
    if (value < 40) {
        color = 'red';
    } else if (value > 70) {
        color = 'green';
    }
    cell.getElement().style.color = color;

    return value;
}

```

copy everything from `function ( ... }` into the `formatter` value.

Tip: The callbacks are running in the dashboard / browser so use the development tools for debugging. simple `console.log()` might help for easy bugs

You can alter the DOM with the `style` object ... so a lot of possibilities!

Good night 😉

---

_[View the full topic](https://discourse.nodered.org/t/ui-table-in-conjunction-with-ui-table-handler/56554)._
