SUBFILE_ACCESSOR Object

RAMP-NL

SUBFILE_ACCESSOR Object


The SUBFILE_ACCESSOR object may be used to access a 5250 subfile from a script.

See the movie Using Subfile Accessor - 5 minutes.

Properties

SelectionColumnOffset

The offset of the selection column when it is in a different row to the matched column. Default is 0 (zero), indicating it is on the same subfile row.   

SelectionKey

The key to be sent to select an entry in the subfile. The default is KeyEnter.

If you don't want any key to be pressed, set this value to null (no quotes).

KeyPageDown

The key to be used to page the subfile down. The default is KeyPageDown.

Scrollable

Indicates whether the subfile may be scrolled down. The default is true.

Trace

Indicates whether detailed trace information should be produced from the subfile when trace mode is on. The default is true.

SelectionByCursor

Used when selection is to be done by cursor location. Default is false. Typically SelectionByCursorOffset is also set when using this value.

SelectionByCursorOffset

When using SelectionByCursor this value indicates the offset between the matching row in the datagrid control and the actual 5250 screen line number the cursor should be positioned to.

 

For example, if the first data line in 5250 subfile (visualized as a datagrid) was on line 12 of the 5250 display, you would set this property to 11. This indicates that a match on datagrid row 3 (say) would map to real 5250 screen line 3 + 11 = 14.        

EndofFileMarker

Set the EndofFileMarker property to the value used in the subfile/browselist marker when the end of file has been reached. It will be then used to determine the end of the subfile when trying to select an entry. Default is "Bottom".

This property can be set in RAMP scripts like this;

objAccessor.EndofFileMarker = "End";

 

This will be used to determine when scrolling is no longer required.

UseMarker

Set the UseMarker property to false when the subfile/browse list does not use markers.

Note that you must set the EndofFileMarker property to all or part of the message that appears when scrolling past the end of the subfile/browselist so the Subfile Accessor can determine when the end of the subfile/browselist is reached. The default is true.

 

 

Methods                                

Dispose()

Used to dispose of a SUBFILE_ACCESSOR object when you have completed using in a script

SetSearchColumnNumber(1,2,3,4);

Defines a search column, by column number, to be used when looking for an entry in the subfile. Arguments are:

1 – Column Number

2 – Value to Search for

3 – Search without regard to case. Optional. Default false. 

4 – Search using "contains" matching rather than exact equality. Optional. Default false.   

SetSearchColumnName(1,2,3,4)

Defines a search column, by column name, to be used when looking for an entry in the subfile. Arguments are:

1 – Column Name

2 – Value to Search for

3 – Search without regard to case. Optional. Default false. 

4 – Search using "contains" matching rather than exact equality. Optional. Default false.  

SelectSubFileEntry()

Searches the subfile using the column search and selection details provided and selects the required subfile entry.

TracePage()

Dumps the current subfile details to the trace (if trace is active). No arguments. 

SetSelectionColumnName(1,2,3)

Defines the selection column, by column name, to be used when selecting an entry in the subfile. Arguments are:

1 – Column number

2 – Selection value to be used

3 – Unselection value. Optional. Default is that automatic unselection of columns is not performed. 

SetSelectionColumnNumber(1,2,3)

Defines the selection column, by column number, to be used when selecting an entry in the subfile. Arguments are:

1 – Column number

2 – Selection value to be used

3 – Unselection value. Optional. Default is that automatic unselection of columns is not performed. 

 

Use the right mouse when coding scripts to generate base SUBFILE_ACCESSOR code.  See Using the Scripting Pop-up Menu.