Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 7437 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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

Posted

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

  • 4 weeks later...
Posted

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.

This topic is 7437 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.