I'm committed to interfacing with an existing DBF based Desktop application.
Using a UX component, I need to enter new data into three tables. A header table with 2 one-to-many child tables.

I have successfully been able to write xbasic code when working with just one child, but I'm not sure how to handle 2 child tables?
I have the following in the server side afterDialogValidate event which works with one child table.

''enter the new record
dim t as p
t = table.open("[PathAlias.ADB_Path]\bed_po_hdr.dbf")
t.ptransno = newPTransno
t.site = e.datasubmitted.site
t.ponumber = upper(e.datasubmitted.mypo)
t.posted = .F.
t.pDate = date()

''now fill in the child table, bed_po_parts
if e.repeatingsectioninfo[1].totalRowCount >= 1 then
	tc = e.repeatingsectioninfo[1].totalRowCount
	list1 = e.repeatingsectioninfo[1].deletedRows	'crlf_to_comma(
	i = 1	
	dim tbl as p
	while i <= tc
	if word_exists(list1,alltrim(str(i)),crlf()) = .F. then
		tbl = table.open("[PathAlias.ADB_Path]\bed_po_parts.dbf")
		tbl.ptransno = newPTransno
		tbl.site = e.datasubmitted.site
	end if
	i = i + 1
	end while
end if
Here's a portion of e.datasubmitted which shows data for the 2 child tables. At this point, I don't know what to do.