Hi;
Ran into this problem (seems to me an obvious problem, so maybe the solution is already there)
I made a controller that is generic for record views of several different tables. On this controller there is a button “Group” doing a “currentcontroller.loadAllRecords”. This effectifly regroups the records but I loose my “Currentrec”.
While searching for an answer is saw posts referring to foundset.SelectRecord. However this has a problem for my solution
-
I retrieve the name for the currentform with currentcontrolller.getName
-
I do currentcontroller getMaxRecordIndex()
-
I want to say forms[currentform].foundset.selectRecord(PK). But how do I obtain the PK for any given table. I can do currentcontroller.getTable. I can make it a JsTable and do getColumns but I want to do getPKColumn for a given Table. Since this info is stored in Servoy, it should be easy.
Any insights appreciated