Defining Conditions for Objects

Use this procedure to define a condition.

The following table describes the field types you can use in a condition.

Choose To
Database Select a field from the primary file or from a file with a one-to-one relation from the primary file.
Compute Select or define a compute field. For instructions, see Defining a Compute Field.
Array Value Define an array value field. For instructions, see Defining an Array Value Field.
OTM Field Select the value of a field from the first record of a file with a one-to-many relation from the primary file.
Parameter Select a parameter field. You must first define the parameter field on the Parameter Definition form. For more information, see Defining a Parameter Field.

To define a condition

  1. Access the condition window for an object.

    For information on how to access the condition window for each object, see the definition of that object.

    If a condition already exists for the kind of object being accessed, the Select Condition Name window appears with the list of existing conditions displaying and the light bar on New Condition.

  2. To add an existing condition, choose the desired condition name.

    - or-

    To define a new condition, choose New Condition.

    A condition window appears:

    If a condition for the object being accessed does not exist, condition window for that object appears automatically.

  3. Define the condition.
    1. Left Parenthesis

      Select no parentheses, one parenthesis, or two parentheses.

    2. First Operand

      Press Select (F4) and choose the desired option.

      Choose To
      Field

      Select a field type to define a field as the first operand. Some field types are not valid on certain kinds of conditions.

      For a description of each field type, see the table following this procedure. For more information on fields, see Painting Fields on a Form - Output Field Types.

      Relation Define a relation check condition. For more information, see Relation Check Condition.
    3. Operator

      Select equal to (=), not equal to (), greater-than (>), greater-than or equal to (), less-than (<), or less-than or equal to ().

      For a relation check condition, select Exist(s) or Do(es) Not Exist.

    4. Second Operand

      Press Select (F4) and choose the desired option.

      Choose To
      Field

      Select a field type to define a field as the second operand. The value must be the same type and no larger than the size of the field in the first operand. Some field types are not valid on certain kinds of conditions.

      For a description of each field type, see the table following this procedure. For more information on fields, see Painting Fields on a Form - Output Field Types.

      Value Define a constant value. Type a value and press OK. The value must be the same type and no larger than the size of the field in the first operand.
      Note: A relation check condition does not have a second operand.
    5. Right Parenthesis

      Select no parentheses, one parenthesis, or two parentheses.

      Each parenthesis in the Right Parenthesis field must correspond to a parenthesis in the Left Parenthesis field.

  4. To define additional statements in the condition, press Enter and select And or Or to join the conditional statements.

    A condition can have up to eight conditional statements.

  5. After you define the condition, press OK.
  6. In the Condition Name window, type a name for the condition.
  7. Press OK to save the condition.