This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 23, 2011, 10:37 AM
261 Posts

Re: array error

  • Category: Server Side JavaScript
  • Platform: All
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 4
Hi Ruslan,
 
I've found multi-dimensional arrays always hard to work with. Why don't you try creating an array of objects, e.g.:

var a = [];  //creates the array

for (var i=0; i<dc.getCount(); i++) {
 a.push( { "value1" : "myItemValue1", "value2" : "myItemValue2" } );  //adds an object to the array with 2 properties: value1 and value2
 doc = dc.getNextDocument();
}

Apr 23, 2011, 11:34 AM
2 Posts
Re: array error
Hi, Mark!
 
Yeah, I used push method in another place in my script and it worked well, just in this very place it looked like to be easier to work via multidimentional array, but it really seems like a trick to work on.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal