Go to Contents
Previous
Page
Next
Page
Contents > Functions reference (alphabetical list) > Design functions > RelationInfo function

RelationInfo function
Format

RelationInfo(fileName;tableName)
Parameters
fileName - the name of an open database file (local or remote).
tableName - the name of a table in the specified database file.
Important   See Design functions for information about literal text parameters.
Data type returned
text
Description
Returns a list of four values for each relationship directly related to tableName. Values in a list are separated by carriage returns, and lists are separated by two carriage returns. For each additional relationship connected to tableName, an additional list of four values is output.
The four values are:
Source: Data Source Name of the database table connected to tableName
Table: the name of the table connected to tableName
Options: the options that were set in the right side of the Edit Relationship dialog box when the relationship was defined. This line is blank if the following options are not set; otherwise these options are separated by spaces.
Delete, if Delete related records in this table when a record is deleted in the other table is selected in the right side of the Edit Relationship dialog box
Create, if Allow creation of records in this table via this relationship is selected in the right side of the Edit Relationship dialog box
Sorted, if Sort records is selected in the right side of the Edit Relationship dialog box
Relationships: a list of the defined relationships, one per line. Field names are fully qualified, for example, TableName::Field Name.
Example
A database file called Human Resources has three tables: Company, Employees, and Addresses. Company::Company ID is connected to Employees::Company ID, Employees::Employee ID is connected to Addresses::Employee ID and Employees::DateOfHire is connected to Addresses::DateMovedIn.
The relationships have the following criteria:
You can create records in all tables.
You cannot delete records in all tables.
A sort was specified for the Addresses table for the Employees<-->Addresses relationship.
RelationInfo("Human Resources";"Employees") returns:
Source: Human Resources
Table: Company
Options: Create
Company::Company ID = Employees::Company ID
 
Source: Human Resources
Table: Addresses
Options: Create Sorted
Addresses::Employee ID = Employees::Employee ID
Addresses::DateMovedIn >= Employees::DateOfHire
Related topics
Functions reference (category list)
Functions reference (alphabetical list)
About formulas
About functions
Defining calculation fields
Using operators in formulas

Contents > Functions reference (alphabetical list) > Design functions > RelationInfo function
Previous
Page
Next
Page