This topic is locked

Add record directly from master page

10/4/2010 3:58:29 PM
PHPRunner General questions
J
joeedel author

Searched all over the forums and can't find the answer, I want to be able to add a child record directly from the master page. I have a master table "Students" and want to add attendance records to the "Data" table (with the pertinent info from the student table such id already filled in). As it works now I have to view the student's records in the data table then click the "Add" button creating an extra step. If I could just replace the view links that phrunner creates with other code I could get it to work. For example the view link that phprunner creates ends up making this link



http://localhost/attendance/_data_list.php?mastertable=_student&masterkey1=268



if I could replace it with

http://localhost/attendance/_data_add.php?mastertable=_student&masterkey1=268



I would get the desired effect.
Thanks in advance for any help,

Joe

Sergey Kornilov admin 10/4/2010

This is a built-in option. Double-click on Master-Details relationship link and choose details records to appear on Add/Edit/View pages of Master table.
You can also display child records inline on master list page and add new child records right there.

J
joeedel author 10/5/2010



This is a built-in option. Double-click on Master-Details relationship link and choose details records to appear on Add/Edit/View pages of Master table.
You can also display child records inline on master list page and add new child records right there.


Maybe I'm not phrasing my question correctly or maybe I'm an idiot, but when I double click on the relationship link in the datasource tables view I only get options to see detail records and such as seen in this image what am I missing.


I have three tables, a Teacher table related to a students table that is related to a data table (that holds the attendance record); when I click on the view link on the teacher table I see all the students, I want to be able (from this window) to add a record related to the student directly to the data table w/o having to click the view link next to the student first. I've tried to illustrate below


Thanks sorry if I am missing the obvious,

Joe

A
ann 10/6/2010

Joe,
this option was added in the latest version only (PHPRunner 5.2).

To combine two different pages on one page use ifames. Here is a helpful link:

http://www.w3schools.com/TAGS/tag_iframe.asp