Develop > Tailoring > Data management > Data validation > Look-up processing > Validate fields during record processing

Validate fields during record processing

During record processing, the fields in a record can be validated one at a time or in a particular order.

Note: To invoke validity table processing, see the related topics. You must validate each validity table definition before using it to validate data records.

  1. Access the Format Control record for the form which you want to invoke validity table processing. If a record does not already exist, you must create one. For details on accessing and using Format Control, see the related topics.
  2. Display the Subroutines process.
  3. Enter validate.fields in the Application Name field.

    Note: The logical values in the Add, Update, and Before fields are examples only. For information on how to decide when Format Control is processed, see the related topics.

  4. Enter the applicable parameters for validate.fields in the Name and Value fields using the information from the following table:

    second.file$fileExecutes all validity table records (all fields) defined for the file being processed.
    name<field name>Executes only one validity table definition (one field) defined for the file being processed.

    Note: You can repeat this type of definition in the Format Control subroutines section as many times as necessary. However, it is more efficient to call the subroutine once and pass a list of the fields to be validated.
    names<list of fields> or $<variable>Executes a specific list of validity table definitions defined for the file associated with the form.
    For example, define a $ variable in either the Initializations or Calculations process of the Format Control record as:
    $fieldlist={"reason", "risk", "planned.start"}

    In the Subroutine call, specify the Value input as:

    Name: names Value: $fieldlist

    Note: You can use any variable name you choose, however, you are responsible for ensuring that your variable name does not corrupt a variable used by the application validate.fields.
    textcurrent.format() or <form name>Executes a specific list of validity table definitions defined for the form just displayed to the user.

  5. Enter a message in the Error Message field.

    The recommended error message is: The original record is displayed.

    If a message is not defined, an unfriendly error message is issued when returning to the data record.

  6. Click Save.

Related concepts

Invoking validity table processing
Data validation
Format Control
Format Control processes

Related tasks

Display value summary details
Display range summary details
Create validity table definitionsAdd field-level definitions
Add value definitions
Add range definitions
Validate the validity definitions
Delete an entire validity record
Delete a single value or range definition
Delete value or range definitions from a table
Print a detailed report of an entire validity record
Create a validity lookup option in Format Control
Call validate.fields from Format Control

Related references

Validity validation rules