4D v14.3

GET RELATION PROPERTIES

Home

 
4D v14.3
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

 
HISTORY 

Created: 4D v6.7

 
SEE ALSO 

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

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)