Add a browse to your window
- Last Updated: January 16, 2024
- 3 minute read
- OpenEdge
- Version 12.8
- Documentation
Next you add a browse control to the window that displays Orders.
To add a browse to your window:
- 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.
- 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
Customertable has already been selected and marked as<external>, because by default the AppBuilder expects you to displayOrdersof the currentCustomer, and theCustomerfields and their query are external to your browse. - 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.
- Click the Fields button. This brings up the Column Editor.
- Click the Add button to bring up the Multi-Field
Selector dialog box.
This dialog box displays fields from both the
Customertable and theOrdertable. It does not make much sense to putCustomerfields into the browse, because they always have the same value for everyOrderof a givenCustomer. - Scroll down to the Order fields and select some:
- 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.
- For now, just click OK again. This returns you to the Query Builder.
- Click OK once more. This brings you back to the design window, where the AppBuilder has added the browse for you.
- 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.
- Press F2 again to rerun your window:
Now the AppBuilder has constructed another query to select just those
Ordersfor the currentCustomer, 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.