version 6.7
GET RELATION PROPERTIES (fieldPtr|tableNum{; fieldNum}; oneTable; oneField{; choiceField{; autoOne{; autoMany}}})
Parameter | Type | Description | |
fieldPtr|tableNum | Pointer|Longint | Field pointer or table number | |
fieldNum | Longint | Field number if the table number is passed as | |
first parameter | |||
oneTable | Longint | One table number or 0 if no relation is defined | |
from the field | |||
oneField | Longint | One field number or 0 if no relation is defined | |
from the field | |||
choiceField | Longint | Choice field number or 0 if no choice field | |
autoOne | Boolean | True = Auto relate one, | |
False = Manual relate one | |||
autoMany | Boolean | True = Auto one to many, | |
False = Manual one to many |
Description
The GET RELATION PROPERTIES command returns the properties of the relation (if any) which starts from the source field defined by tableNum and fieldNum or by fieldPtr.
You can pass:
Either table and field numbers in tableNum and fieldNum,
Or a pointer to the field in fieldPtr.
Once the command has been executed:
The oneTable and oneField parameters contain respectively the table and field number to which the relation (from the source field) is pointing. If there is no relation starting from the field, these parameters return 0.
The choicefield parameter contains the choice field number (from the target table) defined within this relation. If no choice field has been set for this relation, or if no relation starts from the source field, this parameter returns 0.
The autoOne and autoMany parameters return True if, respectively, the "Auto Relate One" and "Auto One to Many" boxes has been checked for this relation; otherwise, they return False.
Note: The autoOne and autoMany parameters will also return True if no relation starts from the source field (in this case they return non-significant values). The value of both the oneTable and oneField parameters allows you to make sure that a relation exists.
See Also
GET FIELD ENTRY PROPERTIES, GET FIELD PROPERTIES, GET TABLE PROPERTIES, SET AUTOMATIC RELATIONS, SET FIELD RELATION.