PDA

View Full Version : JScript Issue



mcgrogan40
10-27-2008, 06:20 AM
Hi,

This is probably very easy for someone but I have never worked with Jscript before so apologies!

I am editing an xaction – specifically the Process Action component. I run a query and reference some of it’s contents. I am trying to get the last value in column 1 of the dataset so added a Javascript Process action which looked at the ‘query_result’ query. I have added this to the JavaScript box:


rowCount = query_result.getRowCount();
ssnEnd = query_result.getValueAt(rowCount,0);


with rowCount set to integer and ssnEnd set to string in the Scrupt Outputs box. Although rowCount returns a value, I get a NULL value for the ssnEnd field. Any ideas?

mcgrogan40
10-28-2008, 02:58 AM
Well, I solved this one:


rowCount = query_result.getRowCount();
ssnEnd = query_result.getValueAt(rowCount,0);

should read:

rowCount = query_result.getRowCount();
ssnEnd = query_result.getValueAt(rowCount-1,0);