|
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.
Subsections
before.choice:
The actions programmed in this subsection are executed immediately before the specified command is executed. You can use this subsection, for example, to test data before the command process continues. You can use the choice.again() function to stop the command.
on.choice:
The actions programmed in this subsection are executed when the specified command is activated. These actions are executed instead of the standard action associated with the command. This subsection is not always available. For details, see the list at the end of this help topic.
after.choice:
The actions programmed in this subsection are executed immediately after the specified command has been executed. This subsection is not available for the end.program and abort.program commands.
Example
choice.first.view: | standard command after.choice: execute(first.set)
choice.ttadv2111m000: | form command before.choice: export_var = "some value"
Standard commands
The following table lists the available standard commands and the types of program in which the various choice subsections can be programmed for each command.
| start.set |
Add/start a new group in main table |
1234 |
---4 |
1234 |
| first.view |
View first group of main table |
1234 |
---4 |
1234 |
| next.view |
View next group of main table |
1234 |
---4 |
1234 |
| prev.view |
View previous group of main table |
1234 |
---4 |
1234 |
| last.view |
View last group of main table |
1234 |
---4 |
1234 |
| def.find |
Find a specific record on key |
1234 |
---4 |
1234 |
| find.data |
Start the set from the current data in the program script. Use: after import of data in a zoom process. (refresh) |
1234 |
---4 |
1234 |
| first.set |
View first set of main table |
1234 |
---4 |
1234 |
| next.set |
First execute an update.db and then view next set of main table |
1234 |
---4 |
1234 |
| display.set |
Open read-only details |
1234 |
---4 |
1234 |
| prev.set |
First execute an update.db and then view previous set of main table |
1234 |
---4 |
1234 |
| rotate.curr |
Show amounts in other currency (on.choice subsections are available for this command only if no currencies are set) |
1234 |
1234 |
1234 |
| last.set |
View last set of main table |
1234 |
---4 |
1234 |
| add.set |
Insert a new record |
1234 |
---4 |
1234 |
| update.db |
First test consistency of data and then (re)write record or set (save) |
1234 |
---4 |
1234 |
| dupl.occur |
Copy the record to a new one |
1234 |
---4 |
1234 |
| recover.set |
Undo modifications which are not yet written to the database |
1234 |
---4 |
1234 |
| mark.delete |
Delete selected records |
1234 |
---4 |
1234 |
| mark.occur |
Select a record on the screen |
1234 |
---4 |
1234 |
| change.order |
Change the search key |
1234 |
---4 |
1234 |
| modify.set |
Change a record stored in the database |
1234 |
---- |
1234 |
| print.data |
Make a report with the current data on the form |
1234 |
1234 |
1234 |
| create.job |
Add session in job |
1234 |
---- |
1234 |
| change.frm |
Go to another form in session. The command mnemonic (as used by the execute() command is form.tab.change. |
1234 |
---- |
1234 |
| first.frm |
Go to first form |
1234 |
---- |
1234 |
| next.frm |
Go to next form |
1234 |
---- |
1234 |
| prev.frm |
Go to previous form |
1234 |
---- |
1234 |
| last.frm |
Go to last form |
1234 |
---- |
1234 |
| resize.frm |
Resize the current form |
1234 |
1234 |
1234 |
| zoom |
Out dated: use before.choice.<session> instead. Zoom to another session/menu |
1234 |
---- |
1234 |
| interrupt |
Do an action each time interval |
1234 |
1234 |
1234 |
| end.program |
End execution of the session; the main table will be updated |
1234 |
---- |
---- |
| abort.program |
Cancel execution of the session. The main table is not updated |
1234 |
---- |
---- |
| text.manager |
Start the text manager |
1234 |
---- |
1234 |
| run.job |
Run job of session |
1234 |
1234 |
1234 |
| global.delete |
Delete range of records |
1234 |
1234 |
1234 |
| global.copy |
Copy range of records |
1234 |
1234 |
1234 |
| save.defaults |
Save values as defaults |
1234 |
---- |
1234 |
| get.defaults |
Get previous stored defaults |
1234 |
---- |
1234 |
| chm |
Chart Manager is started. The command mnemonic (as used by the execute() command is start.chart. |
1234 |
---4 |
1234 |
| start.query |
Start query by form |
1234 |
---4 |
1234 |
| bms |
A broadcast message is received |
1234 |
1234 |
1234 |
The following commands are supported for backward compatibility only. Support is not guaranteed in future versions of the software.
- cont.process
- user.0
- user.1
- user.2
- user.3
- user.4
- user.5
- user.6
- user.7
- user.8
- user.9
Related help topics
User Notes
The choice.sessionnumber: |* Form Command Section does not work, as found in Baan V.
Try instead:
choice.zoom:
This works on any session declared as a Session Zoom Form Command.
|