3 Replies Latest reply on Jun 11, 2015 6:53 PM by BillR_1

    Copy Field Based on Value in another field



      Copy Field Based on Value in another field


      I suspect there's an obvious answer here, but I can't figure it out. I have a three tables: Company, Contacts and Invoice. I can tie various employees to a single company, and I can relate an invoice to a company. My problem is, Person A and Person B are simply contacts for Company 1, but Person C is the billing/invoice contact for Company 1. I set up a button field for "Is Invoice Contact" with a Yes and No value list on the Contacts table.

      How can I pull over the contact name field to the invoice, based on a "Yes" in the "Is Invoice Contact" field?

      Thank you in advance for any help. I'm getting woozy from banging my head against a wall on this.

        • 1. Re: Copy Field Based on Value in another field

          The Person A, B, C are employees of a company.  If there are many, they should be on their on table with their own titles (one being Invoice Contact), linked to company. Then on the Invoice, I would put a field called Invoice Contact, that either auto enters or looks up the invoice contact person from the company/employee table.  I don't think the button and yes/no is necessary, but the main question is, Is one person always designated the invoice contact person?.  If so, in the employee table, on that employee's record is where I would put the check box--but don't think its needed.

          • 2. Re: Copy Field Based on Value in another field

            If there is never more than one contact that is the Invoice/Billing contact for a given company, you can set up an additional relationship between a Tutorial: What are Table Occurrences?and company for that purpose:


            Company::_fkBillingContactID = Contact|Billling::__pkContactID

            Then you can refer to Contact|Billing on the invoices layout to show data about the billing contact

            _fkBillingContactID can be set up with a conditional value list of just the contacts linked to that company in order to make it easy to select one as the billing contact.

            • 3. Re: Copy Field Based on Value in another field

              Thank you both for the help. It's working for me now, and I can finally move forward past this roadblock.