Specific procedures
Lengthening Fields
Follow these steps to increase the number of characters that can be entered in an input field on a window:
  • Create an .sch file for the table that contains the field with the increased number of characters in $NX_ROOT/site/mods (UNIX) or installation-directory \site\mods (Windows), or use an existing .sch file if one exists.
    Note:
    You must include the schema.mac macro file in new .sch files, as shown below: #include "../schema.mac" 
  • Enter this statement in the file to define the increased number of characters:
    TABLE table_name { field value_type size ;}
    where:
    • table_name identifies the database table that contains the field you are lengthening (for example, Change_Request).
    • field is the name of the field you are lengthening (for example, charge_back_id).
      value_type is the field’s data-type. This could be a macro that determines the current length of the field.
    • size is the new length.
  • Follow the appropriate set of steps under Updating the Database Schema to stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
  • Start Screen Painter.
  • Using the directions under Copying a Window Definition in the chapter “Using Screen Painter,” copy the form containing the field you want to lengthen.
  • Open the form you wish to change. The window definition for the form appears.
  • Select the field you want to lengthen.
  • Click the square handle at the end of the field and drag it out until it is wide enough.
  • Save the form, and quit Screen Painter.
  • For your new form to take effect, choose Form Group, Refresh from the Administration menu in the Unicenter Service Desk client interface.
Making a Field Required
Note: Modification to the schema to make a field required is recommended only with a new database. See Making a Field Required Without Making Schema Changes for procedures to make a field required for an existing database.
Follow these steps to force users to enter a value in a field before they can close a window:
  • Add a value to the field in all existing records by following these steps:
    a. Run pdm_extract to copy existing records that contain this field to a file:
    pdm_extract table_name > filename
    where:
    table_name identifies the database table that contains the field you aremaking required.
    filename is the name of the file that will contain the output.
    b. Edit the output file to define a value for every occurrence of the field you are making required.
    Note:
    Windows users should use WordPad to edit the file.
    c. Run pdm_userload to update the database with the new data in the edited file, where
    filename is the name of the file with the edited output from pdm_extract:
    pdm_userload -f filename –u
  • Create an .sch file for the table that contains the field that will be required at the database level in $NX_ROOT/site/mods (UNIX) or installation-directory \site\mods (Windows), or use an existing .sch file if one exists.
    Note: You must include the schema.mac macro file in new .sch files, as shown below:
    #include "../schema.mac"
  • Enter this statement in the .sch file to define the field as being required at the database level:
    TABLE table_name { field value_type NOT_NULL;}
    where:
    table_name identifies the database table that contains the field you are making required.
    field is the name of the field you are making required.
    value_type is the field’s data type.
  • Create a new .mod file to contain the statement that will define the field as being required at the object level in $NX_ROOT/site/mods/majic (UNIX) or installation- directory\site\mods\majic (Windows).
  • Enter this modification statement in the .mod file:
    MODIFY obj_name att_name REQUIRED;
    where:
    obj_name identifies the object whose attribute is being modified.
    att_name identifies the attribute being modified.
    See the appendix “
    Object Definition Syntax” for this statement’s complete syntax.
  • Follow the appropriate set of steps under Updating the Database Schema to stop, reconfigure, and restart Unicenter Service Desk, and reload the data.
Making a field required without making schema changes
Note: Making a field required without making schema changes is recommended only with an existing database. See Making a Field Required for procedures to make a field required for a new database.
Follow these steps to force users to enter a value in a field before they can close a window:
  • Create a new .mod file to contain the statement that will define the field as being required at the object level in $NX_ROOT/site/mods/majic (UNIX) or installation- directory\site\mods\majic (Windows).
  • Enter this modification statement in the .mod file:
    MODIFY obj_name att_name REQUIRED;
    where:
    obj_name identifies the object whose attribute is being modified.
    att_name identifies the attribute being modified.
    For example, to make the Category field on the Change Order Detail window required, use the following statement:

    MODIFY chg category REQUIRED;
    See the appendix “Object Definition Syntax” for this statement’s complete syntax.
  • Follow the appropriate set of steps under Updating the Database Schema to stop, reconfigure, and restart Unicenter Service Desk, and reload the data.