lbencic
9th April 2003, 18:54
In Baan V you use the Form Commands session to attach other sessions (functions and menus) to a Form. If you specify 'Activate a Function', you program that function in the main script of the session. If you specify 'Activate a Session' is there a corresponding section in the script I can program? I seem to think there should be, and I did find reference in the Programmers Guide:
BaanERP Programmers Guide:
4GL choice sections
--------------------------------------------------------------------------------
You use choice sections to program actions that you want to be executed when standard commands or form commands are activated or ended. Choice sections consist of a main section and a subsection. The main section specifies the standard command or form command for which the actions must be executed. The subsections specify when the actions must be executed.
Main section
choice.<standard command>:
The subsections associated with this main section are executed for the specified command. You can enable standard commands and specify form commands from the session Sessions(ttadv2500m000). A list of standard commands appears at the end of this help topic. For form commands, the session, menu or function name is used.
This seems to indicate I can code something like:
choice.tiedm1201m000:
before.choice:
If the session tiedm1201m000 is attached as a session to the Form in Form Commands, which would be really cool :), but this does not compile. There is no example in the guide, and my eyes are going blinky from grepping 'choice' everywhere...
I also tried
choice.201:
where 201 is the ID of the Form Command....nothing compiles. I know I can move this to a function and code the zoom.to$ there, but I would rather not change the standard form.
BaanERP Programmers Guide:
4GL choice sections
--------------------------------------------------------------------------------
You use choice sections to program actions that you want to be executed when standard commands or form commands are activated or ended. Choice sections consist of a main section and a subsection. The main section specifies the standard command or form command for which the actions must be executed. The subsections specify when the actions must be executed.
Main section
choice.<standard command>:
The subsections associated with this main section are executed for the specified command. You can enable standard commands and specify form commands from the session Sessions(ttadv2500m000). A list of standard commands appears at the end of this help topic. For form commands, the session, menu or function name is used.
This seems to indicate I can code something like:
choice.tiedm1201m000:
before.choice:
If the session tiedm1201m000 is attached as a session to the Form in Form Commands, which would be really cool :), but this does not compile. There is no example in the guide, and my eyes are going blinky from grepping 'choice' everywhere...
I also tried
choice.201:
where 201 is the ID of the Form Command....nothing compiles. I know I can move this to a function and code the zoom.to$ there, but I would rather not change the standard form.