I_DSPFLD

Display data to one input field

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall I_DSPFLD(window_id, field_spec, data[, a_methoddata1, ..., a_methoddata20])

window_id

The ID of the input window containing the field to display. (n)

field_spec

The specification for the field that I_DSPFLD will display data to. (See Field specifications for information.) (a)

data

The data to display. (a or n)

a_methoddata1 through a_methoddata20

(optional) Up to 20 additional data arguments. (any)

I_DSPFLD displays data to an input field, regardless of any input set associations.

If either window_id or field_spec is invalid, a fatal error occurs.

Data is interpreted and displayed according to the input field’s definition, regardless of the actual type of data. The data is not put into any structure associated with the field, and a field does not have to be part of an input set. You can use this subroutine to access a field whether or not it is associated with any set.

Note that by default, Toolkit does not require the size of data to match the size of the referenced field (field_spec). If the sizes don’t match, Toolkit generates an error only if g_dtkbounds is set to 2 or greater (see g_dtkbounds). And note that Toolkit also generates a fatal error with this setting if an integer value is passed for a non-integer field or vice versa (though no error is generated for user-defined data types).

A_methoddata1 through a_methoddata20 are up to 20 additional optional arguments that can be passed to I_DSPFLD. I_ DSPFLD, in turn, passes them directly to %IDISPLAY_METHOD. This allows you to communicate additional information to your display method.

Note that if I_DSPFLD is used with an unframed field after the input window for the field has been added to a tab set, renditions will be applied to the field that may not match the renditions for the window. See %TS_TABSET for more information.

In the following example, the data “Smith” is loaded into the field LSTNAME:

last_name="Smith"
xcall i_dspfld(wndid, "LSTNAME", last_name)

In the next example, the data “AB101” is loaded into the field ORDNO[3]:

ordno="AB101"
xcall i_dspfld(wndid, "ORDNO[3]", ordno)