The fact that a relation exists between two files means that, given a record from one file, it is possible to look for a corresponding record on the other file in order to obtain related data items.CA 2E allows you to specify which data items are to be obtained through a file-to-file relation by allowing you to specify virtual fields. A virtual field is a field that is present logically in a view of a file although it physically resides in another file.
Virtual fields can be specified on the following relations:
FIL Order line REF Refers to FIL Product REFT
VRT Product name XT
where:
Virtual fields can be defined only in one direction on the relation. In CA 2E, the file that can contain virtual fields is the file where the relation is defined. For example, Division is Owned by Company. Fields from the Company (owning file) can be virtualized to the Division (owned file). Fields from Division cannot be virtualized to Company. Division contains the virtual fields. Division is where the Owned by relation is defined.
A virtual field may itself be a virtual field on the referenced file.
You can specify virtual fields for relations using the Virtual Field Entries panel.
The example below shows how virtual fields are added to a relation:
FIL Order CPT Known by 1 FLD Order code REF
FIL Order CPT Has 2 FLD Order date CDE
FIL Order CPT Has 3 FLD Order status TXT
FIL Order CPT Refers to 4 FIL Customer
VRT Customer name
FIL Order detail CPT Owned by 1 FLD Order REF
VRT Order date DT#
VRT Order status STS
VRT Customer code CDE
VRT Customer name TXT
FIL Order detail CPT Known by 2 FLD Order line no CDE
FIL Order detail CPT Has 3 FLD Order quantity QTY
FIL Order detail CPT Refers to 4 FIL Product REF
VRT Product name TXT
|
|
Order |
|
|
Order detail |
|
K V |
Order code Order date Order status Customer code Customer name |
|
K V V V V K
V |
Order code Order date Order status Customer code Customer name Order line no Order quantity Product code Product name |
See the chapter "Maintaining Your Data Model" for more information on how to add virtual fields to a relation.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |