getDatasetByQuery problem ??

Hello Everybody

This one drives my crazy

I have a form(recordview with one record loaded)
In a tabpannel i have another unrelated form “Anzeige_Pruefobjekte” (tableview). Datasource = pug_schulung.rbobjekte
The form has only one field (rbobjekteid)
On show of “Anzeige_Pruefobjekte” i do:

var vquery = "select distinct rbobjekte.rbobjekteid from rbobjekte "+
" join  rbqspruefpos on rbqspruefpos.rbobjekteid = rbobjekte.rbobjekteid and rbqspruefpos.rbqspruefkopfid = '"+globals.g_gewaehlte_pruefung+"'";
	
var vprobj = databaseManager.getDataSetByQuery('pug_schulung',vquery,null,-1);
application.output("Prüfung=" +globals.g_gewaehlte_pruefung);
application.output(vprobj);
forms.Anzeige_Pruefobjekte.foundset.clear();
forms.Anzeige_Pruefobjekte.controller.loadRecords(vprobj);

The application.output is OK!
The wanted 6 rbobjekteids.
But in “Anzeige_Pruefobjekte” these ids where are not shown ???
The form shows 6 different rbobjekteids ???

What do i miss
Regards
Albert

When you do loadRecords(dataset), it loads the records with the primary keys in the dataset.
Since 6 records are loaded, but you see different id’s in your table view, I can think of 2 causes:

  1. The field in the table view doesn’t show the rbobjekteid

  2. rbobjekteid is not the primary key of the table.