selectRecord not working

Hi all

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

Any ideas??

I would say : It looks like a Servoy bug in the foundset.selectRecord() when a table filter is active on the table of that foundset.

This one is a show stopper for our solution so some early feedback from Servoy would be welcomed!

Ian

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!

Has this been addressed - we raised a case but no feedback here.

Will a fix be in 6.0.6 - it has broken our solution and probably will affect others too!

Hi

This is really a blocker for us, can someone please comment from Servoy?

Regards

did anybody create a case?

Hi

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.

We are still having the issue however.

Regards

do make a case with a reproducible example then. The we can look at it

I have a similar problem, where selectRecord does not work for new a created record.