The subroutine SetFieldApp receives a field name and its properties as parameters, and assigns the properties to the field.

The subroutine assigns the following field properties: field visibility, whether the field is required, the number of the page (tab) on which the field should be displayed, and the view order (from left to right and from top to bottom).

Add a call to the subroutine SetFieldApp in the user-defined function FieldCust_AddDefect. For details on this function, see FieldCust_AddDefect.