Joining three tables using INFORMIX/SQL FORM
Posted in 1992
I am joining three tables using the INFORMIX/SQL FORM. For some reason, the field values of the first table gets CLEARED when the user does the following steps. User adds data to first table then does the "DETAIL" followed by "ADD" to add data to the second table. However, If the user query the information from the first table then does the "DETAIL" followed by "ADD" to add data to the second table; the field values of the first table is NOT CLEARED. My question is that why above two steps behaves diffrently? It should not clear the field values of the first table. I am including the form below. I am using the version 4.0. Any help would be greatly appreciated. Thanks. Ruchi ****** CUT HERE ****** database teledata screen size 24 by 80 { ================================================================================ UNIVERSITY OF SOUTH FLORIDA -- DIVISION OF TELECOMMUNICATIONS PURCHASE ORDER REQUISITION Purchase Order Number: [a] [f009 ] Issued Date: [f010 ] Expiration Date: [f011 ] Vendor Code: [f000] :[d001 ] ------------------------------------------------------------------------------ Item Number: [f014 ] Object Code: [f015 ] Quantity: [f016 ] Item Desc: [f017 ] : [f019 ] : [f020 ] : [f021 ] : [f022 ] Amount: [f023 ] Date: [f024 ] Total amount approved: [f018 ] ================================================================================ } end tables porders porders_item porders_item_price vendors attributes a = porders.po_pfx, UPSHIFT, include = ("B", "M", "C", "K"), comments = "(B)lanket, (M)aintenace, (C)ontractual, C(O)mmodity", reverse; f009 = *porders.po_num = porders_item.po_num = porders_item_price.item_po, reverse; f010 = porders.issue_date, reverse, color=red; f011 = porders.exp_date, reverse; f000 = porders.vend_code,UPSHIFT, lookup d001 = vendors.vend_name, joining *vendors.vend_code, reverse; f014 = *porders_item.item_no; = porders_item_price.item_no, reverse; f015 = porders_item.obj_code, reverse; f016 = porders_item.qty, reverse, upshift; f017 = porders_item.item_desc[1,60], reverse, upshift, wordwrap compress; f019 = porders_item.item_desc[61,120], reverse, upshift, wordwrap compress; f020 = porders_item.item_desc[121,180], reverse, upshift, wordwrap compress; f021 = porders_item.item_desc[181,240], reverse, upshift, wordwrap compress; f022 = porders_item.item_desc[241,300], reverse, upshift, wordwrap compress; f023 = porders_item_price.item_price, reverse; f024 = porders_item_price.price_date, reverse; f018 = displayonly type money; instructions porders master of porders_item porders_item master of porders_item_price composites <porders_item.po_num, porders_item.item_no> <porders_item_price.item_po, porders_item_price.item_no> AFTER EDITADD EDITUPDATE OF exp_date if f010 > f011 then begin comments BELL REVERSE "Expiration date can not be before issued date." nextfield = f010 end AFTER ADD UPDATE QUERY OF PORDERS_ITEM_PRICE let f018 = total of f023 AFTER DISPLAY OF PORDERS_ITEM_PRICE let f018 = 0 end