A typical Work With screen has a subfile/browselist of objects (in this example Employees), each with an option field.

In RAMP a subfile is displayed as a data grid.

In this tutorial we want to enter option "8" in front of a specific entry in the data grid:

Name the data grid

Open the screen in newlook Designer, click on the grid and specify EMPLOYEE_LIST as the Name property in the Misc section.

Note that the data grid and the subfile have different numbers of columns and rows

To select an employee in the grid using SUBFILE_ACCESSOR

Create the SUBFILE_ACCESSOR object:

   var SFL = new SUBFILE_ACCESSOR ("EMPLOYEE_LIST");

Put an "8" somewhere in column "Opt":

   SFL.SetSelectionColumnName("Opt","8");

Then locate the employee that has "A0090" in column "EmployNumber":

   SFL.SetSearchColumnName("EmployNumber","A0090");

Put the value into the subfile:

   SFL.SelectSubfileEntry();

Lastly, destroy the subfile object:

   SFL.Dispose();

Do not write subfile code manually

Instead see how to create a subfile script Using the Scripting Pop-up Menu and then modify it as required.

Find out row and column names

Use the Probe button which appears on RAMP screens.

See Also

SUBFILE_ACCESSOR Object.