User Tools

Site Tools


setfield_set_the_substitution_value_of_the_field_macro_.htm
Navigation:  ABC Library Reference > ErrorClass > ErrorClass Methods >====== SetField (set the substitution value of the %Field macro) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

SetField( fieldname )

blk2blue.jpg

SetField Sets the substitution value of the %Field macro.
fieldname A string constant, variable, EQUATE, or expression that indicates which field produced the error.

The SetField method sets the substitution value of the %Field macro. This value replaces any %Field symbols within the error message text.

Implementation:

Assigns the fieldname parameter to the ErrorClass.FieldName property.

Example:

!Lookup on State Code failed

GlobalErrors.SetField('State')  !set field that failed

GlobalErrors.ThrowMessage(Msg:FieldNotInFile,'State File')  !process the error

See Also:     FieldName

setfield_set_the_substitution_value_of_the_field_macro_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1