Implement the form and program

Implement the form and program on the Business Application diagram.

  1. Go to Project > src > Applicationflow and open the appflow.4ba file.
    This is your Business Application (BA) diagram, which shows the flow of your program. It includes one program entity (Main) and one CRUD form entity (form).
  2. Right-click on the Form entity and select Implement CRUD Form from Database to generate a form for the database table that you wish to access.
  3. Select the officestore database and the account table. Select the first ten fields and use the single right arrow to add these fields to the Selected Fields list.
    Figure: New Form from Database wizard Column selection

    This figure is a screenshot of New Form from Database wizard Column selection.
  4. Click Finish to accept the defaults from the rest of the wizard prompts.
    By default, the form is organized in a Grid layout with two columns.
  5. Save the form as accounts.4fdm in the $ProjectDir/src directory and insert it in the project under the Entities node.
    Figure: Projects Structure view

    This figure is a screenshot of the Projects Structure view.
  6. Right-click the Main program entity and select Implement Program.
  7. Using Save As, save the program file as Main.4prg in the $ProjectDir/src directory, and insert it in the project under the Main_prg node. This file is used to generate the source code for the main function. Click OK to close the Save As dialog.
    Figure: Implementing and saving the program

    This figure is a screenshot of appflow.4ba diagram and the Save As dialog.
  8. Select File > Save all.