I have tried using useSeperateFoundset but it does not help my case.
I want contact$list & contact$detail to share the foundset 1 and relation$list & relation$detail to share the foundset 2.
If I check useSeperateFoundset for relation$list & relation$detail forms then we get 3 different foundsets. one for contact$list & contact$detail another for relation$list and another for relation$detail
You can either use the shared foundset or the seperate foundset.
When you use a seperate foundset it’s up to you to keep forms in sync with the foundset of your choosing.
With controller.loadRecords(myOtherFoundset) you keep them in sync.
Thanks for explanation. If it would be possible to use foundset groups that would have been very handy (less coding).
My question is if I use controller.loadRecords(myOtherFoundset), when I move the cursor pointer from one record to another record in my form1, will it automatically move the cursor in the form2 as well? (both form1 & form2 share same foundset using the above loadRecords method)
I just tested it (in 2.2.7). And the answer is no.
Once you are not using shared foundsets you have the control.
Or to say it differently, you then need to control everything.
But your record browsing example can easily be ‘fixed’ with a onRecordSelection event.
In the onRecordSelection of the form1 if I set the recordIndex of the form2 I hope it would not again trigger the onRecordSelection of the form2 or will it?
It will trigger the onRecordSelection.
If you use the onRecordSelection event on both forms you might want to check if form1 has already the same selectedindex as form2 before setting it, and vice versa.