I'm attempting to return unique location names, but I seem to misunderstand the whole add column and distinct keyword options...
Servoy 7.1
/** @type {QBSelect<db:/stsservoy/idfiles>} */
var q = databaseManager.createSelect('db:/stsservoy/idfiles');
q.result.add(q.columns.id_location);
q.result.distinct = true;
q.where.add(
q.and
.add(q.columns.marks_id.isin(idlist))
);
var resultQ = databaseManager.getFoundSet(q);
I anticipated that I would ONLY get the selected column, id_location, and only a set of single-value rows with unique values for each row.
Upon execution, I get the entire column nameset, and all records that match the idlist array for column marks_id.
I'd rather not use cycles to go through and find values unique to a single column.
Hints? (Actually, looking for answers to both. One, limit the returned foundset to the columns that are specifically added. And, two, getting these unique columns...
thanks,
--Joe.