Newbies Darwin99 Posted April 25, 2008 Newbies Posted April 25, 2008 Hi there, First excuse my english because its quite poor. I tried to find the solution of my problem, but I can´t find. Perhaps its too simple... Here is it: - I have two different filemaker databases, one for contacts and other for invoicing. I want to use my contacts data with my invoices and i don´t want to type in all invoices the same data i have in contacts. How can I do it? Thank you and sorry for simple question.
bcooney Posted April 27, 2008 Posted April 27, 2008 You need to relate the two tables using the Contact key. A key is a field that usually is an auto-entered serial number and is unique to all the records in the table. It is often named, __kP_EntityID. So, in Contacts you'd have __kP_ContactID and in Invoices you'd have _kF_ContactID, which is the foreign key. Then relate the two tables by Contacts::__kP_ContactID=Invoices::_kF_ContactID. On the Contact Form, you could have a button "New Invoice" attached to a script that captures the __kP_ContactID into a variable $ContactID, switches to an Invoice Form layout, creates a new record and sets the _kF_ContactID to the variable, $ContactID. Once the Invoice has the _kF_ContactID set, then any fields from the Contact table that are on the Invoice Form will display the respective Contact data. These fields must come from a Table Occurrence that uses the Invoice to Contacts by ContactID relationship. I suggest reading a bit of FM's user guide or help on building relationships.
Recommended Posts
This topic is 6112 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 accountSign in
Already have an account? Sign in here.
Sign In Now