Hi, I am looking at populating entries to a new DBF file and am struggling on the design approach.
Currently I have a set with FAXHEAD as parent and FAXITEM as child (one to many). I want to populate a new child table, POITEMS (one to many) with the entries going into FAXITEM if the entry in FAXHEAD is a PO (purchase order).
I am looking a TRIGGERS and TRIGKEYS but am not sure yet which event to TRIGGER off when entering items in FAXITEM.
In FAXITEM I have MESSAGEID, PARTID, QUANTITY, PRICE.
Message ID is populated from parent automatically, the PARTID is entered via a lookup from Partnumber DB (child o/o from Faxitem).
Quantity is entered from customer's request and price MAY OR MAY NOT be entered.
In POITEMS (the new DBF) I want to populate:
a field CONTROL_ID whose value is pulled from the Partnumber DB.
Customerref and CUST_ID, held in FAXHEAD
The purpose of the new new table is to provide control for outstanding orders and better inventory management, which currently is done semi manually.
I had thought of expanding the number of fields in FAXITEM but this covers more than PO's and has data going back a long time. If I could copy the data from it and add the control ID value and ifno from header when I get a new PO it would then form a good base for what I want to do.
Anybody done this or have strong suggestions?
Steve
Currently I have a set with FAXHEAD as parent and FAXITEM as child (one to many). I want to populate a new child table, POITEMS (one to many) with the entries going into FAXITEM if the entry in FAXHEAD is a PO (purchase order).
I am looking a TRIGGERS and TRIGKEYS but am not sure yet which event to TRIGGER off when entering items in FAXITEM.
In FAXITEM I have MESSAGEID, PARTID, QUANTITY, PRICE.
Message ID is populated from parent automatically, the PARTID is entered via a lookup from Partnumber DB (child o/o from Faxitem).
Quantity is entered from customer's request and price MAY OR MAY NOT be entered.
In POITEMS (the new DBF) I want to populate:
a field CONTROL_ID whose value is pulled from the Partnumber DB.
Customerref and CUST_ID, held in FAXHEAD
The purpose of the new new table is to provide control for outstanding orders and better inventory management, which currently is done semi manually.
I had thought of expanding the number of fields in FAXITEM but this covers more than PO's and has data going back a long time. If I could copy the data from it and add the control ID value and ifno from header when I get a new PO it would then form a good base for what I want to do.
Anybody done this or have strong suggestions?
Steve
Comment