The Section Editor helps you insert a preprocessor value or other text
into your procedures and triggers by giving you access to a number of useful lists of
elements you might need in your code. These include database fields, event names, and
more.
To use the Section Editor to edit the four button triggers in the sample
procedure:
Select the first button in the design window, then click the Edit
Code icon from the AppBuilder toolbar to open the Section
Editor.
In the Section Editor window, select all
the field names after the DISPLAY keyword then
right-click.
From the pop-up menu, select Insert > Preprocessor Name:
In the Code References dialog box, double-click on the
DISPLAYED-FIELDS preprocessor to insert it into the code. The
code for BtnFirst should look like this:
DO:
GET FIRST CustQuery.
IF AVAILABLE Customer THEN
DISPLAY {&DISPLAYED-FIELDS}
WITH FRAME CustQuery IN WINDOW CustWin.
{&OPEN-BROWSERS-IN-QUERY-CustQuery}
APPLY "VALUE-CHANGED" TO OrderBrowse.
END.
Repeat Steps 1 to 4 for the other three button triggers.
Now when you run the window you should see the proper Comments
field for each Customer: