[FX.php List] Creating header record and x sub-records from one Submit

Tim 'Webko' Booth tim at nicheit.com.au
Wed Oct 10 00:56:37 MDT 2007


Dear All,

(And I'll probably kick myself when I get an answer but...)

OK, for the sake of argument, I have to create one header record and 
then x sub-records in a related table...

Creating the main record and grabbing the ID is easy, and I've got 
whatever info I need for each of the sub-records available.
I can't use lookups based on IDs - not my choice, this system was 
originally FM only and scripted imports between tables, so I've got 
to carry the data across into the sub-records and insert it at the 
same time as I create them...

What's the best way to go about creating the sub-records?

Pseudo-code for the Submit page:

Code:

<form name="Create Request" action="request.php" method="post">
Header Record Info
<input type="hidden" name="requestedBy" value="Tim Booth by web">
Purchase Order No: <input type="text" name="purchaseOrder">
Notes: <input type="textarea" name="notes"></textarea>

SubRecord 1
<input type="checkbox" name="pickMe" checked value="R1741841">
<input type="hidden" name="Account" value="BHP Steel">

SubRecord 2
<input type="checkbox" name="pickMe" checked value="R1743443">
<input type="hidden" name="Account" value="BHP Steel">

...

SubRecord n
<input type="checkbox" name="pickMe" checked value="R1743447">
<input type="hidden" name="Account" value="BHP Steel">

<p align="right"><input type="submit" name="ak" value="Create Request"></p>
</form>


Thoughts?

Cheers

Webko


--
NicheIT Pty Ltd
http://www.nicheit.com.au 




More information about the FX.php_List mailing list