I_USER

Retrieve/load the user-defined string for an input field

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall I_USER(window_id, field_spec, [data][, new_data])

window_id

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

field_spec

The specification for the field whose user-defined string I_USER will retrieve or modify. (See Field specifications for information.) (a)

data

(optional) Returned with the user data string. (a)

new_data

(optional) The new user data string. (a)

I_USER reads or modifies a user-defined string (up to 80 characters) for a field.

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

If no user data was defined for the field (in other words, you did not specify a user qualifier on the .FIELD script command), no operations will occur and no errors will be generated. Even if you specify data, it will not be modified. (Thus you could check for user field data by placing a known string in data before the call and seeing if it is still there after the I_USER call.)

Note that by default Toolkit does not check for size. It truncates the user field data if data or new_data is not large enough. Toolkit checks the size of these arguments and generates an error for a size mismatch only if g_dtkbounds is set to 2 or greater. See g_dtkbounds.

Also note that the size of the user field data is fixed by the size of the string used during the set’s compilation. Writing data out to the string won’t change the size of the string.

The following example gets the user data associated with the password field. In this example, the system password could be maintained in the input window for easy verification.

xcall i_user(inpid, "password", sec_chk)