5 Replies Latest reply on Sep 25, 2012 6:48 PM by hobbiesdeveloper

    Table Relationship Problem

    hobbiesdeveloper

      Title

      Table Relationship Problem

      Post

           Hello,

           I need some help with getting a database table relationship working correctly on my end. I'm trying to add a button which will show which will show the matching purchase order warehouse location for a specific order line item that with the appropriate warehouse location.

           I tried linking the selectedorder_LINEITEM with selectedorder_POLINEITEM to show results only if the Product ID are matching and the Invoice Number's are matching as shown in picture but no luck. If i remove the Invoice Number Relationship from the Relationship List it will work with just _kf_ProductID = _kf_ProductID but not like this

           _kf_ProductID = _kf_ProductID     AND
           v_InvoiceNumber = v_POInvoiceNumber

           Basically the _kf_ProductID is HPI1503 and right side _kf_ProductID is HPI1503 and v_InvoiceNumber is UT555 and right side v_InvoiceNumber is UT555 than display the order line item. However the Order Line item has 2 Different PO Invoices with the same Product "HPI1503" which is why i need to match up with the PO Invoice # and the Order Side Invoice Number which isn't working.

           The v_POInvoiceNumber has 2 results  = UT555 and PA555, but i need it to match the UT555.

            

           Please let me know how to match up with the correct value if there are 2 invoices with the same product id ?

           Thanks.

      ScreenHunter_11_Sep._24_17.23.jpg