There are some functions in the database manager to deal with conversions of arrays to foundsets
// converts a foundset to a dataset
var dataset = databaseManager.convertToDataSet(foundset);
// convects an array to a dataset
var dataset = databaseManager.convertToDataSet(new Array(1,2,3,4,5,6));
var query = 'SELECT table.primary_key FROM table WHERE table.primary_key IN (2844,2845,2846,3441) ORDER BY table.primary_key';
controller.loadRecords(query);
var query = 'SELECT table.primary_key FROM table WHERE table.primary_key IN (2844,2845,2846,3441) ORDER BY table.primary_key';
controller.loadRecords(query);
Robert, yes the record is indeed there.
Patrick, yes the SQL query route works.
Essentially I’m trying to add a specific PK to an existing foundset. Turning the foundset into an array and pushing the extra PK works. If a SQL query can use a named array, we then have a complete answer. My experiments to replace the PK string with a named array thus far have not worked.