GET RELATION PROPERTIES

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 6.7


GET RELATION PROPERTIES (fieldPtr|tableNum{; fieldNum}; oneTable; oneField{; choiceField{; autoOne{; autoMany}}})

ParameterTypeDescription
fieldPtr|tableNumPointer|LongintField pointer or table number
fieldNumLongintField number if the table number is passed as
first parameter
oneTableLongintOne table number or 0 if no relation is defined
from the field
oneFieldLongintOne field number or 0 if no relation is defined
from the field
choiceFieldLongintChoice field number or 0 if no choice field
autoOneBooleanTrue = Auto relate one,
False = Manual relate one
autoManyBooleanTrue = 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.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next