CDO$HELP.HLB  —  fld-properties  BASED_ON, Examples
    1.CDO>  DEFINE FIELD SUPERVISOR_BADGE_NUMBER
      cont>   BASED ON BADGE_NUMBER
      cont>   VALID IF SUPERVISOR_BADGE_NUMBER > 500.

      In this example, the DEFINE FIELD command bases SUPERVISOR_
      BADGE_NUMBER on the BADGE_NUMBER field element. The VALID
      IF property is an additional property that is unique to
      SUPERVISOR_BADGE_NUMBER.

    2.CDO>  DEFINE FIELD MANAGER_BADGE_NUMBER
      cont>   BASED ON SUPERVISOR_BADGE_NUMBER
      cont>   VALID IF MANAGER_BADGE_NUMBER > 1000.

      In this example, the DEFINE FIELD command bases a second field
      element on the element created in the previous example. The
      VALID IF property explicitly defined for the new element
      overrides the property included in the previous element.

    3.CDO>  DEFINE FIELD SUPERVISOR_SSN
      cont>   BASED ON SSN.

      In this example, the DEFINE FIELD command creates a new element
      from a standard element (SSN). When you use the BASED ON
      property to give different names to field elements that share
      the same properties, you base the new elements on a field
      element that does not change frequently.

    4.CDO>  DEFINE FIELD MANAGER_SSN
      cont>   BASED ON SSN
      cont>   QUERY_HEADER IS "MANAGER SSN".
      CDO>  CHANGE FIELD MANAGER_SSN
      cont>   NOBASED ON.

      In this example, the NOBASED ON keyword removes the BASED ON
      property, but does not remove the QUERY_HEADER property, from
      the MANAGER_SSN field element. Because all other MANAGER_SSN
      properties were based on SSN, you must define new properties
      for MANAGER_SSN, unless the QUERY_HEADER property is adequate.
Close Help