company logo

PropertyHandle :: GetReference - Get reference from structure definition

The function returns the name of the reference or relationship (except MEMO fields that are considered as attributes) according to the given index. The reference index corresponds to the definition of the structure.

References in base structures or embedded structures are returned as property paths (e.g. address.city when address is a structured attribute in person and city is a reference in address). The leading part for base structures (usually the structure name) is displayed only when passing YES for the full_path option.

Generic attributes can be considered as references or as attributes. The generic option defines whether generic attributes are considered as references.

If there are no references defined for the structure the function returns NULL . When an reference with the given index has been found the function returns the property path in the fldpath .

The function returns the path in communication area of the property handle. This area is destroyed when calling the next PropertyHandle function.

Return value:  proppath - Title unknown ( NString & )

Implementation details

const NString & PropertyHandle  :: GetReference ( int32 indx0, logical full_path_w=YES, logical generic=YES )
  • indx0 - Position in collection

    The position of an instance in a collection depends on the selected index. if the collection is unsorted the position is the only way for accessing the instance.

    For sorted collections the position is determined according to the instance key. If is a contradiction between position and key value the position will be ignored.

    Special positions are

    CUR_INSTANCE (-1) refers to the currently selected instance. If no instance is selected it refers to the first instance.

    FIRST_INSTANCE (0) refers to the first instance in a collection according to the selected index (sort order).

    FIRST_INSTANCE (0x7fffffff) refers to the last instance in a collection according to the selected index (sort order).

  • full_path_w - - internal feature (not documented) Default: YES
  • generic - Generic attribute option

    The option allows considering generic attributes as references.

    Default: YES