4D v14.3

SET AUTOMATIC RELATIONS

Home

 
4D v14.3
SET AUTOMATIC RELATIONS

SET AUTOMATIC RELATIONS 


 

SET AUTOMATIC RELATIONS ( one {; many} ) 
Parameter Type   Description
one  Boolean in Status of all Many-to-One relations
many  Boolean in Status of all One-to-Many relations

SET AUTOMATIC RELATIONS temporarily changes all the manual relations into automatic relations for the entire database in the current process. The relations stay automatic unless a subsequent call to SET AUTOMATIC RELATIONS is made.

  • If one is true, then all manual Many-to-One relations will become automatic. If one is false, all previously changed Many-to-One relations will revert to manual relations.
  • The same is true for the many parameter, except that manual One-to-Many relations are affected.

This command changes relations set as manual in the Design environment to automatic, just before executing operations that require them to be automatic (such as relational queries and sorts). After the operation is finished, relations can be changed back to manual by calling SET AUTOMATIC RELATIONS again.  Any relations set as automatic in the Design environment are not affected by this command.

Note: When you pass True to the SET AUTOMATIC RELATIONS command, the automatic mode is "locked" for all the manual relations during the session. In this case, any calls to the SET FIELD RELATION command during the same session are ignored, regardless of whether they are placed before or after SET AUTOMATIC RELATIONS. To "unlock" the automatic mode and take the calls to SET FIELD RELATION into account, pass False to SET AUTOMATIC RELATIONS.

Example  

The following example makes all manual Many-to-One relations automatic and reverts any previously changed One-to-Many relations:

 SET AUTOMATIC RELATIONS(True;False)

 
PROPERTIES 

Product: 4D
Theme: Relations
Number: 310

 
HISTORY 

Modified: 4D 2004

 
SEE ALSO 

About Relations
GET AUTOMATIC RELATIONS
GET RELATION PROPERTIES
SELECTION RANGE TO ARRAY
SELECTION TO ARRAY
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)