remove dataset records if null on fetch
When I write the following code on fetch for dataset
var tmpArray = reportContext.getPersistentGlobalVariable("timeValues");
if (tmpArray.contains(row.Timeslice) == false && row.Timeslice != null)
{
tmpArray.add(row.Timeslice + '-'+row.GroupNo + '-'+ row.Type + '-'+ row.Value);
}
reportContext.setPersistentGlobalVariable("timeValues", tmpArray);
How to remove null
Comments
-
Hi,
Can you share the total code I mean before var tmpArray = reportContext.getPersistentGlobalVariable("timeValues") this line of code. or try to add null!=tmpArray in the if condition.0 -
-
Is there a specific reason you're using an ArrayList object instead of an Array? If you use an Array, you shouldn't see issues with nulls at the end. If you do need to use an ArrayList, you can use ArrayList.trimToSize() to trim the nulls. https://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html
Warning No formatter is installed for the format ipb0
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