When I use a method “onrecordselection” on a form it also executes on all forms of this table when selecting a record. It should only work on the form where I have put this in the properties.
Bug?
Best regards,
Stef
When I use a method “onrecordselection” on a form it also executes on all forms of this table when selecting a record. It should only work on the form where I have put this in the properties.
Bug?
Best regards,
Stef
Yeah in my solution too!
when you jump to another form, the onrecordselection stays
when you go to design-mode en back to browse, the onrecordselection is gone.
This is, I think, not right behaviour!
I discussed this with Servoy since I had the same issue but the other way round.
When I select a record in a portal and then open the related form I expected the onRecordSelection to fire and the attached method to execute. Unfortunately it doesn’t. Next to that if I close that form after doing a new selection that selection stays intact.
It is not a bug however. The onRecordSelection event is a database trigger. We only select the record once and thus we fire it once. If we attach a method that means we trigger the foremost method and the rest is not triggered (ever if we don’t select a new record).
To avoid this we can work with a seperate foundset and hand over the selection…
to give some more points.
We have to to this. Because if someone builds a method that set’s some things (enables/disables or visibilty of fields) when a record get’s selected then this must be done for that form.. even if it is showing or not.
Because when you do switch to that form. That form must be in a valid state.
OK, got the point.
In some cases it’s useful, in others not.
Maybe “onrecordselection on current form” could be an interseting feature.
Stef
I guess you can also set a global variable opening and closing forms to use this as a trigger for (part of) a method…