Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > Project Settings API > Methods

Project Settings API: getMasterKeys()

Scroll Prev Next More

 

Returns the fields that link the specified master table to the current detail table.

Syntax

$settings->getMasterKeys($masterTable);

Arguments

$masterTable

The name of a master table linked to the current table.

Return value

An array with two elements: masterKeys contains fields from the master table, and detailsKeys contains the corresponding fields from the current detail table. Both elements are empty if the specified table is not a master.

Example

Display the first pair of fields linking Orders to Order Details.

$settings = new ProjectSettings("Order Details");
$keys = $settings->getMasterKeys("Orders");
 
echo $keys["masterKeys"][0] . " -> " . $keys["detailsKeys"][0];

See also:

getMasterTables()

getDetailsKeys()

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software