Next you add a browse control to the window that displays Orders.

To add a browse to your window:

  1. If you resized the window to make it smaller, expand it again to make room for the browse.
    As you do this, the window’s frame, which displays as a layout grid, should expand automatically with the window. It is possible that the frame and the window can get out of sync if you inadvertently resize the frame alone (by grabbing its resize handles) rather than the window (by grabbing the corner of the window). If this happens, the layout grid lines will not fill the whole window, as shown:

    To correct this, grab the frame’s lower-right resize handle and drag it down so that it fills the window. If you inadvertently try to drop any visual objects directly onto the window itself, the AppBuilder won’t let you, because all the objects must be contained in, or parented to, the frame.

  2. Click the Browse icon on the Palette; then click the space under the Customer fields.

    The Query Builder dialog box appears again to help you define a database query to populate this browse. You will see that the Customer table has already been selected and marked as <external>, because by default the AppBuilder expects you to display Orders of the current Customer, and the Customer fields and their query are external to your browse.

  3. Select Order from the Available Tables by double-clicking on it or by selecting it and clicking the Add>> button:

    The Query Builder has constructed a query FOR EACH Order OF Customer. This is the same query you created in the sample procedure in “Introduction to ABL.”

    Next you need to select some fields to display in the browse.

  4. Click the Fields button. This brings up the Column Editor.
  5. Click the Add button to bring up the Multi-Field Selector dialog box.

    This dialog box displays fields from both the Customer table and the Order table. It does not make much sense to put Customer fields into the browse, because they always have the same value for every Order of a given Customer.

  6. Scroll down to the Order fields and select some:
  7. Click OK when you are done.

    Back in the Column Editor, there are various field attributes you could set to enable fields or change their label, and so forth.

  8. For now, just click OK again. This returns you to the Query Builder.
  9. Click OK once more. This brings you back to the design window, where the AppBuilder has added the browse for you.
  10. Resize the browse so that all the fields you selected appear. You can also make it taller to display as many rows as you wish.
  11. Press F2 again to rerun your window:

    Now the AppBuilder has constructed another query to select just those Orders for the current Customer, opened it, and used it to populate your browse. And you have not written a line of ABL code yet. This is an example of the power of the OpenEdge development tools.