The purpose of this section is to create a menu root where the forms will be placed, as well as to configure the login menu, where the user can inform the main global variables to be used in the forms.

1 Menu definition

Start by defining the root of the menu. All the forms to be developed will be nested here.

In this case, a menu named TEST_STOCK is initialized.

2 Config form parametrization

For the 3 examples developed in the following sections (basic, intermediate and advanced), the same access menu will be created. and advanced), the same access menu will be created.

For this purpose, a form is created, which is named login_test

Then, access the Form fields tab, and there define the following fields:

  • USER, a required string field where the global variable corresponding to the user will be reported.
  • PASSWD, a required string field to report the global variable corresponding to the user's password.
  • CODALM, a required string field to report the global variable corresponding to the warehouse.

When entering the data in the last field (in this case, CODALM), it is convenient to close this login menu and force loading of the menu where all forms are loaded (in this case: TEST_STOCK).

To do this we use the After client section and enter the following statement:

Copy
//Force to load TEST_STOCK menu
form.setMenu("TEST_STOCK");

//Exits the form without executing the rollback event code.
form.stop()

Except for this last field, it is not mandatory to fill in any additional code in the before_server, before_client, after_server and after_client fields.