This topic is locked

adding child records inside an add record page

5/17/2012 1:14:22 PM
PHPRunner General questions
W
wfcentral author

I have a project that has a table called time & expenses and another table called receipts.
The client would like his employees to be able to enter their time and expenses for a trip AND also upload scanned copies of receipts to go with it.
Is it possible to do this in phprunner?
I guess it is going to be pretty hard to do it BEFORE they have saved the record since the receipts will not know which parent ID they are assigned to.
Is it possible to have it work this way...

  • add time/expense, when you click save it goes to the edit page for that record
  • on the edit page it has the ability to edit the record, but also there is now the ability to ADD receipts if they want
  • then they can click save on the edit screen and go back to the list view.

C
cgphp 5/17/2012

You know the ID of the new record added in the "After record added" event (http://xlinesoft.com/phprunner/docs/after_record_added.htm).

You can enter time and expense, and upload the receipt at the same time.

In the "After record added" event, then, you will update the receipt table.