# Reporting module: testing for null values

**URL:** <https://forum.inductiveautomation.com/t/reporting-module-testing-for-null-values/53564>\
**Category:** Ignition\
**Created:** [November 30, 2021, 12:14pm UTC](https://forum.inductiveautomation.com/t/reporting-module-testing-for-null-values/53564 "2021-11-30T12:14:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgmo](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@pgmo](https://forum.inductiveautomation.com/u/pgmo)\
**Post date:** [November 30, 2021, 12:14pm UTC](https://forum.inductiveautomation.com/t/reporting-module-testing-for-null-values/53564/1 "2021-11-30T12:14:04Z")

</div>

A Table in my report is showing data from a dataset where some values are NULL. Using _keychains_ I’d like to show something else as `<N/A>`. I’m trying with something like

```auto
val!=null?val:'--'

```

or using `None` instead of `null` but nothing seems to work.  
Any suggestion is appreciated.  
Thanks, regards

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 30, 2021, 1:18pm UTC](https://forum.inductiveautomation.com/t/reporting-module-testing-for-null-values/53564/2 "2021-11-30T13:18:13Z")

</div>

The “N/A” is configurable. Have you tried that?

---

<div class="post-metadata">

**Author:** ![pgmo](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@pgmo](https://forum.inductiveautomation.com/u/pgmo)\
**Post date:** [November 30, 2021, 1:43pm UTC](https://forum.inductiveautomation.com/t/reporting-module-testing-for-null-values/53564/3 "2021-11-30T13:43:59Z")

</div>

Thanks pturmel, I did not see it. And if I would like to change the cell background color too, based on `null`s?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [November 30, 2021, 2:19pm UTC](https://forum.inductiveautomation.com/t/reporting-module-testing-for-null-values/53564/4 "2021-11-30T14:19:09Z")

</div>

Huh. No idea.

---

<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:** [November 30, 2021, 3:33pm UTC](https://forum.inductiveautomation.com/t/reporting-module-testing-for-null-values/53564/5 "2021-11-30T15:33:26Z")

</div>

From the [Reportmill docs](http://www.reportmill.com/support/keychains.pdf):

> The first is that the false expression is  
> optional (it will default to null). The second is that RM will evaluate 'null' as false and non-null as true,  
> so you can provide null substitutions like this: `@name? name : "(None provided)"@`.

---

<div class="post-metadata">

**Author:** ![markusx1094](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@markusx1094](https://forum.inductiveautomation.com/u/markusx1094)\
**Post date:** [November 30, 2021, 3:37pm UTC](https://forum.inductiveautomation.com/t/reporting-module-testing-for-null-values/53564/6 "2021-11-30T15:37:57Z")

</div>

With changing the background color you might be able to run a `getBackroundAt` extension function get the value of the cell if it equals `<N/A>` or whatever your null value ends up being and change the background color based on that.
