Jump to content

External Data files record count


Hawk

Recommended Posts

I am using recordWalker to display data from an external data file. How can I display the number of records returned? I able to count all of the records in the file. I need to count just the records where customerID is equal to customer ID in the External Data files.

 

Thanks,

Larry

Link to comment
Share on other sites

I an trying what was suggested, but only getting a return value of 1.

 

Here is the code.

 

 
var ProdCount = "";
var numRecsExtDF = XDF5.recordCount;
for (recordWalker=1; recordWalker <= numRecsExtDF; recordWalker++)
{
    if (XDF5.GetFieldValue(recordWalker, 1) == Field("licenseid"))
   {
       ProdCount += recordWalker + ',' 
   }
}
myCount +=''
var myarray = [ProdCount];
return (myarray.length);

 

If I return ProdCount and use that value as the array it works, but if I use the variable it counts it all as 1.

 

Thanks,

Larry

Link to comment
Share on other sites

You have it right here:

 
var numRecsExtDF = XDF5.recordCount;

You don't need to do any other calculations. Just return XDF5.recordCount (or numRecsExtDF).

 

This simply creates an array with one item:

var myarray = [ProdCount];

Which is why myarray.length is, of course, 1.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...