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

Relating two records to a single record


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

Recommended Posts

Posted

How can I have two related Tables (Statements and Orders) so that a payment and a refund (two different records) in Statements will populate just the one record in Orders?

The Tables are related by the number generated automatically in Orders. The number is entered manually in the relevant Statement record.

The idea being that when the payment and, if applicable, refund appear in the Statement, they are numbered and will show in the Order record in order to validate the item and complete the Order.

I can make it work with a payment or refund but not both.

Can I do this?

Posted

So let me get this straight.

When you create a statement you want to automatically create an order as well.

But when you add a refund to the statement you do not want to create an order (of course)

I would create a separate table occurrence based on the statement table between your statement table and your orders table. Something like:

Orders = StatementToOrders =(greater than zero) StatementLineItems

So your StatementToOrders table occurrence has only the items that are greater than zero (sales) and nothing less than zero (refunds)

Then adjust your "allow records to be created" appropriately.

Posted

so how are you creating a statement via a script?

if so my solution still stands create a separate TO with a greater than relationship. Have your script look at these records that way it only sees the the records that are a charge not a refund.

This topic is 5220 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.