Function DbRList() Foundation

Returns a list of relation names defined for child work areas.

Syntax
DbRList() --> aRelationNames
Return

The function returns a one dimensional array holding strings in its elements. The strings are the names of relations defined for child work areas. When no relation is defined, the return value is an empty array.

Description

The function is used to determine the names of relations defined for all child work areas of a parent work area. If the function is called without alias operator, the current work area is used as parent work area.

Relation names are similar to alias names of work areas or tag names of indexes. They provide a comfortable way for programming with relations since a symbolic name, rather than an ordinal position, can be used to address a specific relation.

Examples
Relation names
// In the example, three relations are defined between 
// four work areas. Then, the names of the relations are 
// displayed for all workareas. Note that the relation 
// names are the default names provided by Xbase++. 

PROCEDURE Main 
   USE CUSTOMER 

   USE ORDERS NEW 
   SET INDEX TO OrdersA 

   USE DETAILS NEW 
   SET INDEX TO DetailsA 

   USE Parts NEW 
   SET INDEX TO Parts 

   SELECT DETAILS 
   SET RELATION TO Upper(PartNo) INTO PARTS 

   SELECT ORDERS 
   SET RELATION TO OrderNo INTO DETAILS 

   SELECT CUSTOMER 
   SET RELATION TO CustNo INTO ORDERS 

   WorkSpaceEval( {|| QOut(Select(), ":", DbRList()) } ) 

   // Result: 
   // 1 : {CUSTOMER_ORDERS} 
   // 2 : {ORDERS_DETAILS} 
   // 3 : {DETAILS_PARTS} 
   // 4 : {} 
RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.