Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Sample events > Appearance

PHPrunner32x32     PHPRunner manual


Show data from a master table on the details view/edit/add page

Scroll Prev Next More

 

Show data from a master table on the details View/Edit/Add pages.

 

To add this event, insert PHP code snippet on the Page Designer screen:

 

global $pageObject;
echo "Master Info<br>";
if ($data = $pageObject->getMasterRecord())
 {
  echo "Field1: ".$data["Field1"]."<br>";
  echo "Field2: ".$data["Field2"]."<br>";
 }

 

For example, "Orders" is a master table and "Order details" is a details table.

 

global $pageObject;
echo "Order Info<br>";
if ($data = $pageObject->getMasterRecord())
 {
  echo "Customer: ".$data["CustomerID"]."<br>";
  echo "Employee: ".$data["EmployeeID"]."<br>";
 }

 

Note: Change red values to match your project.

See also:

getMasterRecord

RunnerPage class

 

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