3 Replies Latest reply on Feb 12, 2011 1:49 AM by Sorbsbuster

    lookup copying data both ways

    KevinHewitt

      Title

      lookup copying data both ways

      Post

      I have two tables, an Estimate and an Invoice database.

      I have a relationship built between the two to enable the Invoice to copy the info from the Estimate when I type in a matching docket number on the Invoice.

      This works fine but the problem is when I modify the Invoice it also modifies the Estimate which a look up is NOT supposed to do.

      Where am I going wrong?

      Thanks in advance

        • 1. Re: lookup copying data both ways
          Sorbsbuster

          Have you the field defined independently in both tables, the one in Invoices being a lookup?  Are you sure that the instance of the field on the Invoice Layout is not actually the related field in Estimates?  When you type in the matching docket number the data will appear there, just as it would with a lookup.  The difference is, of course, that you are not editing the Invoice field, but the Estimates field.

          • 2. Re: lookup copying data both ways
            KevinHewitt

            Thank you for that answer, yes you are correct, that is what I am doing wrong.

            It seems that there is a real process to do this properly because i was sure I created a field, then made it a look up but somehow it became the field from the other table. I am referencing the inspector window which doesn't always help.

            On another note do you you a way to create a lookup from a portal field in the same tables, from my Estimates to my Invoices?

            Really appreciate your time on this, very helpful!

            kevin

            • 3. Re: lookup copying data both ways
              Sorbsbuster

              "somehow it became the field from the other table. I am referencing the  inspector window which doesn't always help."

              If you double-click the field it will show you its name in the list, but also check the top of the Specify Field... dialogue, as it will show you the relationship that you are using to pick up that field.  You may pick up the right field, from the right table, but from the wrong relationship (or wrong 'Table Occurance').  In your case I suspect that you called the field the same name in both tables (nothing wrong with that) but the top of the Specify Field... box would have shown it coming from the other table.  Just change it there.  You could also see the same information in the Inspector's 'Data' tab.

              "do you know a way to create a lookup from a portal field"

              I'm not sure what you mean by this.  If you have a field in a table it can be made to copy data from a field in another table.  You can do that to and from any fields from any tables that are related.  Where you display the field - in a portal or not - is not affected by how the look-up functions.