• No results found

Standard Info Tab

In document SCT 5.1.0 System Tailoring Volume 2 (Page 56-62)

Field Description

Field Name The name of the field within a particular table that is to be validated. This is a required field. Refer to Validity Validation Rules on page 82. You can use one validity table definition to validate the same field name that is defined in multiple files.

For example, if five files (cm3r, cm3t, problem, device, operator) each contain a field named state with a total of 50 valid values, you can define state once in the validity table, and then update the Files/Formats field to contain the names of the five files.

The data type of Field Name must be the same in each of the files named. Use the global variable $vrfield to reference the value of Field Name in the record being validated. Reference all other data fields in the record being validated with the $val file variable.

Files/Formats The names of the files and forms to which this field validation applies. Normal validity table processing validates all fields associated with the file of the data record being validated;

however, there are circumstances when only the fields defined to a particular form need to be validated and the remainder of the fields associated with that file should be ignored. When this occurs, you can define that form name here to change validity processing to validate only the fields associated with that form. This is done by passing the name of the form to the validation routine (see the text parameter value on page 90.

The validity validation routine requires a minimum of one definition for this field. Each value must be a valid file or form name. The validation routine searches the dbdict file first. If an entry is not in the Database Dictionary, the routine searches the format file. If the entry is not a valid form name, a QBE list of valid file names is displayed. From this list you can invoke a search against the format file to select a valid form name.

Note: If you select a form, it must be associated with a valid file and the Field Name must be defined in that file. If the form is not associated with a file, you are prompted to select one from a list of valid files. Refer to Validity Validation Rules on page 82.

Field Desc A brief description of this field. You may enter any word or phrase that best describes the field’s function. This is an optional field.

Sequence The default field validation sequence for the fields within a file is by field name. Sequence allows you to override this order by defining numbers for each of the fields. It is an optional field.

Note: You can also override the default sequence by passing a list of fields to process. Refer to Invoking Validity Table Processing on page 88.

If the file contacts had validity table definitions for the fields contact.name, address, phone, state, and zip, then the default validation sequence is: address, contact.name, phone, state, zip (alphabetical sequence). To override this order, the definitions are updated to contain the following sequence numbers (which are shown in parenthesis): name (1), address (2), phone (1), state (2), zip (3). The validation sequence will now be: contact.name (1), phone (1), address (2), state (2), zip (3). The fields that contain the same sequence number are validated in alphabetical order. Also note that when a list of fields is passed to the validation routine, Sequence is ignored.

The default value is NULL. In an MVS environment, if some of the fields have a number and others do not, the NULL sequence number fields are validated before the non-NULL sequence number fields. In a UNIX environment, the NULL sequence number fields are validated after the non-NULL sequence number fields.

Field Description

Field Type Data type of this field. Supported data types are:

„Number

„Character

„Date/Time

„Logical

The validity validation routine extracts this value from the Database Dictionary of the file named in the Files/Formats field. when the record is validated; however, it can be manually modified. Normally, manual maintenance is only required when a field’s data type is changed in the Database Dictionary record. If a field’s data type is changed, be sure to update the Values/Ranges to reflect the new data type.

1 Update the appropriate Database Dictionary to reflect the correct data type.

2 Logoff of ServiceCenter and log back on to ensure that you are working with the most current version of the Database Dictionary.

3 Update the Values/Ranges definitions for the field whose data type has changed.

4 Invoke the validation routine.

The value in the Field Type field is updated to reflect the new data type.

Array A boolean field that indicates whether or not this field is an array. It is an optional field. The default is false. If the condition evaluates to true at run time, the validity routine validates each element of the array against the defined values, ranges, or secondary query. Refer to Validating Arrays on page 136.

Field Description

Case An optional field that converts the character data entered on the Validity Correction Screen to upper case (uc) or lower case (lc). If this field is NULL, the data is not altered. This field affects character fields only. It is ignored for all other data types. The validation routine assumes that the data passed to it is in the correct case and attempts to validate the data with its case setting as is. If the data does not validate, a Validity Correction Screen is displayed which shows the Values/Ranges that the user can select from. The corrected data entered by the user is in lower case. If the Values/Ranges for the field require upper case data, then a value of uc converts the operator entered data to upper case before it is re-validated. This same logic also applies to the lc setting.

Use this field when the Field Name defined in the validity table is converted to upper case (ctrl setting of 256) or lower case (ctrl setting of 128) in the form in which data is entered for the file.

Unique ID A required character field that, in combination with the Field Name and Sequence fields, uniquely identifies the validity record. If you leave this field blank at add or update time, a validation routine automatically copies the contents of the first element in the Files/Formats array to this field. Refer to Validity Validation Rules, page 82

Validate Cond An optional field that defines the conditions that must exist before the validity table record is processed. If this field evaluates to false at run time, field validation is bypassed. If this field evaluates to true, field validation occurs. The default is false.

Min Elements An optional field that defines the minimum number of elements in the array that must meet the validation

requirements for this field. If the Array parameter is false, the

Field Description

Allow Null A boolean condition that specifies if NULL values are allowed for the field. If the condition evaluates to true at run time, NULL values are allowed. If the condition evaluates to false (the default), NULL values are not allowed. It is an optional field. Operators with SysAdmin capability can enter NULL values even when Allow Null evaluates to false.

NULL Default Defines the value to substitute for a field when original value is NULL. It is an optional field. The NULL Default value must be a Valid Value or Range. When a field is substituted with the NULL Default value, it is then processed through normal Validity table processing. Therefore, if the NULL Default it is not a valid Value/Range, it is treated as being in error, and the operator will have to correct it.

Bypass Cond A boolean condition that specifies if the user will have the option of bypassing validity table processing when a field is in error. If the validation routine determines that a field contains an invalid Value/Range, the user has the option of forcing the application to use the current (invalid) value. The default is false. Users with SysAdmin capability have the option to bypass validity table processing even if the Bypass Condition evaluates to false.

Weight Factor A numeric field used in Change Management processing to calculate the Risk Factor of a Change Request or Task. It is used with the Weight Value field of the Value/Range definitions. It is an optional field. Refer to Change

Management in the Application Administration Guide for more information on the Risk calculation process.

Error Msg The message sent to the user in place of the default message.

More meaningful error messages can be sent to the user when the default message does not adequately convey the meaning of the error. The message (either the default or user-specified) is sent when a field contains an invalid Value/Range. When this field is blank, the following default message is sent:

The value ‘x’ is not valid for the field ‘fieldname’

You can concatenate literal and string variable data to create messages. For example,

Fieldname "+nullsub($vrfield, "unknown")+" is invalid...

Note: Use the function nullsub, as in this example, when including variable data in a concatenated message.

Otherwise, a variable whose value is NULL will render the

Field Description

Prompt Panel The name of the form used to display the valid Values/Ranges when an error is detected for a field. The default format is validate.fields.array. You can use the Prompt Panel to create special correction prompts on a field-by-field basis. The following variables are available for use on any special format you create:

Field Description

Variable Description

$vrfield Current value of the field. In other words, this is the incorrect value you are prompting the user to correct.

$vrorig Copy of the original incorrect value. This value remains constant throughout the correction process for a given field. This variable serves as a reminder to the user as to the field’s original value.

$field.case Represents the case conversion that is in effect for a given field.

$vfldsave Name of the input field the operator is being prompted to correct.

$valid.select An array that contains a summary list of the valid values for a given field. The ctrl setting on the format definition for this input field cannot have the option for no operator input. In other words, it cannot have an option of 4.

$range.select An array that contains a summary list of the

In document SCT 5.1.0 System Tailoring Volume 2 (Page 56-62)

Related documents