Define Validation Properties for a Field

Validation ensures that a defined set of values from Validation table, list, or range is used for field selections.

There are multiple ways to validate fields:

If a Group Object (example: Configuration Item) is used to validate a field, the legal values for the field will include all group members. If the Group Object has full-text search enabled, users can use wildcard characters to search for a legal value when populating the field.

Validate a Field From a Table

You can validate using values from a field in a selected Business Object. To see values, users can press F3 or select the Legal Values button.

When you create Forms, use a drop-down list for the Field Form Control to present valid values in a list.

To validate a field from a table:

  1. From the Validation/Auto-Populate page, select the Validate from Table check box.
  2. In the Table drop-down list, select a Business Object to use to validate the field:
    • Lookup Tables: Select this option to show only Lookup Objects in the drop-down list.
    • All Tables: Select this option to show all Business Objects in the drop-down list.
  3. Select Edit Table Data to open the Data Editor, where you can edit the data contained in the selected Business Object.
  4. In the Field drop-down list, select another field to use to validate the field.
  5. Select Sync to synchronize the validation settings for matching tables for a set of shared foreign key fields. For example, settings applied for the OLA Supplier field would be made to the Supplier field for all members for the Agreements group.
  6. Select the Validation is enforced check box to enforce validation (users can only select from values in the validation table). Clearing this check box allows users to enter values that are not in the validation table.
  7. Select the Selecting values triggers fill check box to use this field as a trigger for auto-populating another field (the other field is auto-populated when the value for this field changes).
  8. Select the On conflict use first match check box to automatically use the first value in the validation table if multiple rows contain the same value. Otherwise, the user is prompted to select which row to use.
  9. In the Limit Values area, add constraints to limit the list of values that are available to the user. For example, you can limit the list of Sub-Categories that are displayed on an Incident based on the value selected for the Category field.
    1. Select Add to add a constraint or filter.
    2. Define the constraint:
    3. Select OK.

    4. Add additional constraints as necessary.
  10. Add additional constraints as necessary. When limiting values change, clear field's value (normal): Select this check box to clear the field's value when any of the constraint values change.
  11. In the Custom Error box, provide an error message that is displayed to the user when an invalid value is selected for a field.

Validate With Range

You can define a Range expression that ensures the field's value is between two values (example: Priority between 1 and 5, percent between 1 and 100, date within a specified time period).

Applicable values include:

To validate with range:

  1. From the Validation/Auto-Populate page, select the Validate with range check box.
  2. From the Left of Range list, provide a value to use as the left boundary for the range. Or, select a value for the field in the drop-down list.
  3. From the Left Operator list, select an operator for the left value in the range.
  4. The Field to Check shows the field that is being validated.
  5. From the Right Operator list, select an operator for the right value in the range.
  6. From the Right of Range list, provide a value to use as the right boundary for the range. Or, select a value for the field in the drop-down list.

    Right operators and values are only available if the left operator is Less Than or Less or Equal. For example, 50 <= 70 <= 90; select values which are less than or equal to each other as you read the values from left to right.

  7. The Expression property shows the range expression using the selected range values and operators.
  8. In the Custom Error box, provide an error message that is displayed to the user when an invalid value is selected for a field.

Validate from a List

You can create a list of valid values for the field. This is useful if you have a handful of values that are unlikely to change, and you do not want to define a Lookup Business Object to hold the values.

To validate from a list:

  1. From the Validation/Auto-Populate page, select the Validate from list check box.
  2. Provide a value in the New box, and then select Add.

    You can also add values to the list by selecting an empty row and entering the value. Use the Up/Down arrows to change the order of selected values.

  3. In the Custom Error box, provide an error message that is displayed to the User when an invalid value is selected for a field.

Validate from User/Customer

You can validate a Business Object field against attributes from users or customers. This is also useful if you want to auto-populate user or customer information when a field changes its value.

This option is a key part of Configure Manual Customer Approvals.

To validate from a user or customer:

  1. From the Validation/Auto-Populate page, select the Validate from User/Customer check box.
  2. Select the User option to validate against a user attribute.
  3. Select the Customer option to validation against a customer attribute.
  4. Select the Current User/Customer option to validate against an attribute for a user or customer that must be logged in to CSM.
  5. Select the By User Type option to validate against a table defined by its ID in another field on the current Business Object. The User Type is based on the Type Id field, which corresponds to the Business Object Definition ID of either user or customer
  6. Select an Attribute Name from the drop-down list. This list of available attributes is the same as the one for the Holds option on the General tab and applies to both the Customer and User Business Objects.

Use Other Validation Types

To use other validation types:

  1. From the Validation/Auto-Populate page, select the Other Validation Types check box to use another type of validation for the field.
  2. Select one of these options:
    • Select the Expression option to use an expression to determine whether the field is valid. You can use either a stored expression or a custom expression.
    • Select the Valid Team or Workgroup option to use all, current or currently logged in teams or workgroups as valid values for the field.
    • Select the Valid Bus Ob Nameoption to use the names of specific Business Object types as valid values for the field. You can use:
      • All Business Objects
      • Major Business Objects
      • Supporting Business Objects
      • Lookup Business Objects
      • Group Business Objects
      • Members of a Group.

        Select the Include Group Leaders check box to include the names of Group Leaders in the valid values for the field.

  3. In the Custom Error box, provide an error message that is displayed to the user when an invalid value is selected for a field.