I am using the following code to select a record in a foundset based on a pk from a different foundset.
var recToUse = databaseManager.getDataSetByQuery(globals.vServerToUse,'Select min(fc_id) from fabric_condition WHERE cd_id = ? group by fc_id',[globals.comp_id],1)
var pk = recToUse.getValue(1,1)
var _select = foundset.selectRecord(pk)
globals.output('fc_id that should be selected '+pk+' fc_id that is selected '+foundset.fc_id+' select record success? '+_select)
However it isnt working.
It works fine when the system is looking at all records, but after applying a tableFilter, it does not work.
I know the records have not been filtered out and I get a response of ‘true’ from the selectRecord call but the record does not get selected.
My console output for test purposes is below.
fc_id that should be selected 2771 fc_id that is selected 2767 select record success? true
If you just need the one record in your foundset I always use foundset.loadRecords(pk)…
foundset.selectRecord(pk) will fail anyway if the pk value is not present in the foundset memory.
lwjwillemsen:
If you just need the one record in your foundset I always use foundset.loadRecords(pk)…
foundset.selectRecord(pk) will fail anyway if the pk value is not present in the foundset memory.
Yes that would be nice but we cant do a load records in this instance Lambert - thanks for the feedback though!
Yes we did create a case, but it was closed rather promptly as i’m told its not reproducible and that we needed a Servoy support package to go any further with this.