2 Replies Latest reply on May 10, 2016 10:00 AM by AlastairMcInnes

    Related tables not working properly




      I have a very odd situation in an FM12 database.


      I have two tables, PubImport and BooksForImportISBN. They are related by PubImport::SKU = BooksForImportISBN::SKU13


      I have a layout based on the PubImport table which has the PubImport::SKU field on it, and the BooksForImportISBN::SKU13 field on it but they're showing different data - and other fields drawn from the BooksForImport table are clearly for the wrong book.


      I'm sure there is something simple I've forgotten to do - I have related tables all over the place and they're all working - but I've been staring at it for a couple of days and can't see it.


      Can anyone point me in the right direction?




        • 1. Re: Related tables not working properly

          Does the SKU field really come from the PubImport table occurrence the layout is based on? –


          And does the SKU13 field really come from the BooksForImportISBN table occurrence that is related to the layout TO by SKU = SKU13?


          If that's not the issue, then screenshots of your layout and relationship graph would be helpful.

          • 2. Re: Related tables not working properly

            Thanks for replying, erolst.


            In order to make a smaller, and more easily screen-grabbed layout, I started a new one based on PubImport and added the SKU field from PubImport and SKU13 from BooksForImportISBN. These, of course, worked fine.


            When I pasted those fields from the new layout to the problem one, they still work but, despite the data field being exactly the same in the Inspector, they show different data to the problem field on the original layout.


            Expanding this, I just made another new layout using the wizard, and it works... I can only assume that I'd managed to get two layouts or tables or something with the same name, but I don't recall how.


            BUT, thanks again for taking the time to reply.