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:

  1. Select the first button in the design window, then click the Edit Code icon from the AppBuilder toolbar to open the Section Editor.
  2. In the Section Editor window, select all the field names after the DISPLAY keyword then right-click.
  3. From the pop-up menu, select Insert > Preprocessor Name:
  4. 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.
  5. 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: