Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Conditional Formatting when values change
stevef
Is it possible to highlight data values when they change? I have an audit report that shows the following:
audit_date audit_user audit_type item_id item_sc item_n Discontinued
21/02/2012 07:09 ZZ_ABCDEF U 49852 ABC abc-0001C y
21/02/2012 07:09 ZZ_UVWXYZ D 49852 ABC abc-0001C n
20/02/2012 12:20 ZZ_ABCDEF U 49852 ABC abc-0001C n
20/02/2012 12:20 ZZ_ABCDEF D 49852 ABC abc-0001C n
20/02/2012 11:54 ZZ_ABCDEF S 49852 ABC abc-0001C n
Any data that is different to the row below needs to be highlighted.
I have attached a mock up spreadsheet.
Is this achievable? Many thanks.
Find more posts tagged with
Comments
XFabien
If I undertood clearly your question, you need to choose the data line of your table, and in the tab 'highlight', you can add the expression to make it out.
stevef
Yes indeed - it's the expression I need help with. Is it possible to compare one fields value with the next row one? So if the date changes the new value is highlighted, if it's the same then it's not.
Tubal
You'd probably need to use a global variable to do this.<br />
<br />
In your table row onCreate event, set a global variable with that row's date with something like:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>var prevDate = this.getRowData().getColumnValue("audit_date");
reportContext.setGlobalVariable("pr", prevDate);</pre>
<br />
Then in your highlight expression, test the current date against the date stored in the global variable.<br />
<br />
row["audit_date"] Not Equal To reportContext.getGlobalVariable("pr")<br />
<br />
I didn't try it, but something like that should work.