4D v13.4

GET RELATION PROPERTIES

Home

 
4D v13.4
GET RELATION PROPERTIES

GET RELATION PROPERTIES 


 

GET RELATION PROPERTIES ( fieldPtr|tableNum {; fieldNum}; oneTable ; oneField {; choiceField {; autoOne {; autoMany}}} ) 
Parameter Type   Description
fieldPtr|tableNum  Pointer, Longint in Field pointer or table number
fieldNum  Longint in Field number if the table number is passed as first parameter
oneTable  Longint in One table number or 0 if no relation is defined from the field
oneField  Longint in One field number or 0 if no relation is defined from the field
choiceField  Longint in Choice field number or 0 if no choice field
autoOne  Boolean in True = Auto relate one, False = Manual relate one
autoMany  Boolean in True = Auto one to many, False = Manual one to many

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.

 
PROPERTIES 

Product: 4D
Theme: Structure Access
Number: 686

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D v6.7

 
SEE ALSO 

GET FIELD ENTRY PROPERTIES
GET FIELD PROPERTIES
GET TABLE PROPERTIES
SET AUTOMATIC RELATIONS
SET FIELD RELATION