Highlight duplicates in a table
Example showing how to highlight duplicate data in a table using a highlight rule and an ArrayList.<br />
<br />
I create an ArrayList in the beforeOpen of my data set.
Then I had to store the values of the column I wanted to check for later in the onFetch()
I also had to store this ArrayList as a global persistent variable from afterClose()
Now that all the values are stored I can use the following scripts as expressions from the highlight rule UI.
Not Equal to
<br />
I create an ArrayList in the beforeOpen of my data set.
array = new java.util.ArrayList();<br />
Then I had to store the values of the column I wanted to check for later in the onFetch()
array.add(row["QUANTITYORDERED"]);<br />
I also had to store this ArrayList as a global persistent variable from afterClose()
reportContext.setPersistentGlobalVariable("array", array);<br />
Now that all the values are stored I can use the following scripts as expressions from the highlight rule UI.
var array = reportContext.getPersistentGlobalVariable("array"); var first = array.indexOf(row["QUANTITYORDERED"]); first;<br />
Not Equal to
var array = reportContext.getPersistentGlobalVariable("array"); var last = array.lastIndexOf(row["QUANTITYORDERED"]); last;<br />
Warning
No formatter is installed for the format ipb
0
Categories
- All Categories
- 107 Developer Announcements
- 53 Articles
- 105 General Questions
- 141 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 76 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 118 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management