August 10, 200421 yr I have a Purchases DB containing 2 tables, the first table (Purchases) contains the order information and the second table (purchasesItems) contains the line items to that order via a relationship [PurchaseOrderNumber = PurchaseOrderNumber]. My Question: Is there a way show related line items from the current found set in the Purchases table. Example: If the current found set in the Purchases table displays say Purchase Order numbers: PO.0001 PO.0004 PO.0020 I would like to create a GoToRelated or Find script which would take me to the PurchasesItems table and display all the related line items from the current found set above.
August 10, 200421 yr A simple looping script "CompilePOs In Found Set" to put the list of IDs in a global Set Field[ g_POID ; """" ] Go To Record [First] Loop Set Field[ g_POID ; "g_POID & POID & "<Carriage Return>"" ] Go To Record [Next, Exit After Last] End Loop Then you'll have a Global that contains "PO.0001 PO.0004 PO.0020" In the relationships Graph add a table occurance called "Purchases Found Set", that is based on the PurchaseItems table and uses the relationship Purchases::g_POID = PurchaseItems::PurchaseOrderNumber Then create a relationship based on this Table occurance (i.e. based on the Purchase Items table) and write another script to Go To Related Record ["Purchases Found Set" ; Show results in layout "New Layout" ]
Create an account or sign in to comment