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 Hi Chris. Try going to the purchasesItems table, finding all records, and setting the value of findThisRecord to 0 for all records. Then go to Purchases, and from there, set all related values of purchasesItems::findThisRecord to 1. Then find all 1's in purchasesItems. Jerry
August 16, 200421 yr I would opt to do this with GTRR. In your Purchases table, create a layout with just the PO # on it [copy PO#s]. Also create a global text field [POLink], which will need to appear on a separate layout [Globals]. Finally, set up a relationship from Purchases::POLink to PurchaseItems::POnumber. Then write a script that does the following: freeze window switch to layout [copy PO#s] copy all records switch to layout [Global] paste [POLink] Go to related record [purchase items; appropriate layout; show only related records] That should do the trick. Add steps to save your clipboard contents if you want to keep things predictable for the end user. -Terence
September 9, 200421 yr How about the following: Make a global field: gFoundSet Next make a relationship between the gFoundSet and the order number: FoundRelated After your find, run a sub scirpt that will "copy" your found order numbers to a single field (gFoundSet) with paragraph separator: Go to first record Loop Setfield [gFoundSet: Case( is empty (gFoundSet)=1, OrderNumber; "PP"&OrderNumber)} go to next record, exit after last End loop Go to related records FoundRelated.
Create an account or sign in to comment