The problem is that the form B is powered by a relationship based on a global variable and when it changes value and refreshes the form B, it loses the multiselect property; so I have to add a method OnDataChange in the variable that synchronizes the relationship. That works fine.
I have form A with a tabpanel containing the form B, with a relation from A to B based on global variables. In form B.onShow I set foundset.multiSelect = true;, but first time when the form is displayed the multiselect do not work.
If I go to another menu of my app and then come back to show again the form B, the onShow is again executed and multiSelect will be set again to true, and now it works.
But if I change the global variable that is used in the relation, from a filter control bound to it, the multiSelect will be reset again to false.
your first issue could be that on the onshow the foundset that you really do show is not set yet (the relation) but i am not sure about that,
You should make a case for this with a simple example so that we can look at it
you second issue is logical, if you change the global variable where your relation is based on, that the form gets a new foundset loaded (the one with the new foreign keys)
For a specific relation there are many foundset instances (1 per foreign key set)
So on the foundset you set multi select on the first time is replaced by another that doesn’t have that property set.