SetValue Method

RAMP-TS

SetValue Method

Set the value of an input field on a 5250 screen. Pass an index to set the value of an input field in a subfile.

Syntax

Define_Com Class(#vf_sy122) Name(#myscreen_wrapper) Parent(#COM_OWNER)

Setting by Name - #myscreen_wrapper.setvalue Infield(sFieldName) Value(vValue)

 

Parameters

Setting by Name:

InField

Char 256 – Required

String that contains the name of an input field. 

Value

Variant – Required

String or number that contains the value. 

Index

Integer - Optional

An Integer that specifies the subfile row of the field.

Note: the specified row index must exist in the current subfile page.

 

 

Return Value

None

Remarks

Only Input fields that have been named can have their values set.

 

Examples

Define_Com Class(#vf_sy122) Name(#myscreen_wrapper) Parent(#COM_OWNER)

#myscreen_wrapper.setvalue Infield(GIVENAME) Value(#Givename)

* Set the value of a field in the 3rd row of the current subfile page

#myscreen_wrapper.setvalue Infield(SFL_OPTION) Value(#SelOption) Index(3)