Invoice and Inventory...relationship help?
After reading the forums for a while (especially this: http://forums.filemaker.com/posts/9befc26ce1) I have four tables set up:
I need help getting these tables to communicate…
I'm not sure if I am having a problem with the relationships I have set up, or if I need to write some scripts to make things function.
I would like the database to automatically create records in the Inventory Log when someone creates a new record in the Inventory Items table. I would also like to have the Invoices update the Inventory Log as well…but don't know how to make the whole "debit and credit" thing actually work…
I thought I could set up an "Add to Inventory Log" button on the Inventory Items screen, but don't know enough about scripts to make it work… I tried using set field and got no results… I DO have "allow creation of new records" checked in the Edit Relationship dialog area though.
This is the script I tried to attach to the button:
New Window [Name: "Inventory Log"]
Go To Layout ["Inventory Log" (Inventory Log)]
New Record Request
Set Field [Inventory Log::ID_ID Inventory]
Is there a step missing in the script, or should I be trying something else to carry a new record over from the Inventory Items table to the Inventory log table? Also, from what I think I understand, creating a new Invoice should also remove items from the inventory log table…but I guess if I can get it working with the Inventory Items table I might be able to figure it out with the Invoices.
Thanks for your help,