Its pretty obviousy a formatting problem here but I’m a bit snow blind with it.
This code fails with the Error Invalid parameter index 2.
Regardless of the number of entries inthe array?? Tried this will lots of different formattings but I still get the error on the getDataSetByQuery.
var recordsToView = foundset.getSelectedIndexes()
var args = new Array()
for(var i=0; i<=recordsToView.length-1; i++) //length - 1 removed
{
foundset.setSelectedIndex(recordsToView[i])
args[i] = foundset.fc_id
}
application.output('New Entry ;' +recordsToView+ ' Args ;'+ args + ' Loop Count ;' + i)
application.output('Args 0 :' +args[0]+ " ; " + 'Args 1 :' +args[1])
var sqlFabric = "SELECT * FROM fabric_condition WHERE fc_id = ?"
var fabricDataset = databaseManager.getDataSetByQuery(databaseManager.getDataSourceServerName(controller.getDataSource()),sqlFabric,args,10)
The data in the array is correct and it does not appear to have any empty or undefined entries!
Is this error related to the SQL Criteria or the Array Index??
Not sure what I have missed here but any feedback will be welcomed.