I create a new record and save it. Then I want to pass this new record to the Servoy Jasper runReport function as a foundset. So I do a find to have only this new record in my foundset and pass it to Jasper. After that I call successfully loadAllRecords on the foundset. Then I try the selectRecord( pk ), but the new record can’t be selected, I assume it is not in the loaded foundset, because it is newly created. I also tried loadRecords( pk ), instead of the find, but it does also no solve the selection problem.
Note that if the foundset has not loaded the record with the pk, selectrecord will fail.
so it is documented that if the record of that pk is not in memory yet then select record will not be able to find it, else we have to potentially fully load a foundset.
loadRecords(pk) should work if the record is saved and in the db. But that will ofcourse only load and show that specific pk, what does go wrong for you in this call then?
Note that if the foundset has not loaded the record with the pk, selectrecord will fail.
so it is documented that if the record of that pk is not in memory yet then select record will not be able to find it, else we have to potentially fully load a foundset.
loadRecords(pk) should work if the record is saved and in the db. But that will ofcourse only load and show that specific pk, what does go wrong for you in this call then?
Yes, I read it. The record was newly created and saved to the database, so I assume it should now in my foundset. I stay on that record in the Smart Client, then I filter the foundset only for that record to pass the filtered foundset to Jasper. After that I load all records back, but then I can’t select that record, on which I stayed before and selection is switched to another record. So I assume the new created record should be also in that foundset or not?