# Table Row Versioning in Reporting

**URL:** <https://forum.inductiveautomation.com/t/table-row-versioning-in-reporting/10690>\
**Category:** Ignition\
**Created:** [October 28, 2015, 6:35pm UTC](https://forum.inductiveautomation.com/t/table-row-versioning-in-reporting/10690 "2015-10-28T18:35:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DSI600](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DSI600](https://forum.inductiveautomation.com/u/DSI600)\
**Post date:** [October 28, 2015, 6:35pm UTC](https://forum.inductiveautomation.com/t/table-row-versioning-in-reporting/10690/1 "2015-10-28T18:35:54Z")

</div>

Where can I find the syntax used in the Version Key row to allow multiple colors on a table in 7.8 reporting. Below I have it working with

Event \_\_\>100?“Alarms”,“Standard”

But what I need is for Event to be in between 100 and 200 for Red

And will also need the same table to display Blue any event over 201

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [October 29, 2015, 3:29pm UTC](https://forum.inductiveautomation.com/t/table-row-versioning-in-reporting/10690/2 "2015-10-29T15:29:43Z")

</div>

So let’s say you want Standard for \< 100, Red for 100-200, and Blue for \> 200, your row versioning could be like this:

```auto
Event __>100?(Event__>200?"Blue":"Red"):"Standard"
```

The parentheses aren’t necessary, just for clarity.

---

<div class="post-metadata">

**Author:** ![ctonge](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@ctonge](https://forum.inductiveautomation.com/u/ctonge)\
**Post date:** [June 28, 2017, 9:59pm UTC](https://forum.inductiveautomation.com/t/table-row-versioning-in-reporting/10690/3 "2017-06-28T21:59:19Z")

</div>

What’s with the 2 underscores? And is there a reference for syntax etc? I’m looking for other operators like AND, OR etc.

I’m also trying to make this work: Perf\<95?(Perf\>90?“badpower2”:“badpower”):“Standard”

less than 90 = badpower  
90-95 = badpower2  
greater than 95 = Standard

But so far I can’t make it work. The above results in everything using “badpower”.

---

<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:** [June 28, 2017, 10:24pm UTC](https://forum.inductiveautomation.com/t/table-row-versioning-in-reporting/10690/4 "2017-06-28T22:24:56Z")

</div>

I’m pretty sure the 2 underscores are just copied from the original post - they have no significance in keychain expressions.

The reference material for keychain expressions is available [here](http://www.reportmill.com/support/keychains.pdf).

Notably:  
Parenthesis `(expr)` Nested expressions  
Multiplicative `*`, `/`, `%` Multiply, divide, modulo  
Additive `*`, `-` Add, subtract  
Relational `>`, `<`, `>=`, `<=` Greater-than, less-than, greater/less-than-equal  
Equality `==`, `!=` Equal, not-equal  
Logical AND `&&`  
Logical OR `||`  
Conditional `?` `:` If/then - with form “expr? true\_expr : false\_expr”  
Assignments `=`, `+=`

---

<div class="post-metadata">

**Author:** ![Paul.Scott](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul.scott/32/4578_2.png) [@Paul.Scott](https://forum.inductiveautomation.com/u/Paul.Scott)\
**Post date:** [June 28, 2017, 10:31pm UTC](https://forum.inductiveautomation.com/t/table-row-versioning-in-reporting/10690/5 "2017-06-28T22:31:33Z")

</div>

@ctonge The syntax looks correct (tests out well too). Is the key “Perf” spelt exactly like that? No trailing spaces or anything to that effect?

[The Key Calculations page in manual](https://docs.inductiveautomation.com/display/DOC79/Key+Calculations) has some additional examples, but as @paul-griffith points out the ReportMill’s docs could help as well.

---

<div class="post-metadata">

**Author:** ![ctonge](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@ctonge](https://forum.inductiveautomation.com/u/ctonge)\
**Post date:** [June 28, 2017, 10:44pm UTC](https://forum.inductiveautomation.com/t/table-row-versioning-in-reporting/10690/6 "2017-06-28T22:44:23Z")

</div>

Ok, I’ve got this figured out. I failed to notice that I was formatting the value as a percentage, and there for my raw value was actually betwen 0 and 1. So it was always lower than 90! Hilarious. I have this figured out now. Thanks for the quick reply!!
