3 Replies Latest reply on Apr 28, 2016 3:40 AM by erolst

    Display referenced filed not worked

    Tanner

      to make it short: FM13, Advanced.

      - 4 tables created: customer, invoice, item and invoiceitems.

      - Relations: Customers -> invoice -> invoiceitems -> Article
      - References set to the appropriate fields:
              the "article_id" from invoiceItem table with the field "article_id" from table "Article"
              the "Description" from invoiceitem table with the field "Description" from the table "Article"
              the "purchase price" from invoiceitem table with the field "purchase price" of table "Article"
        - Portal in layout invoice

        - Typing Article_ID in Article-ID of invoiceItem but the filed is empty.

      I tried everything. Am relatively new to FM. what is wrong with the reference options?

      Please help.

       

      BR

      Tanner



        • 1. Re: Display referenced filed not worked
          erolst

          Hard to tell why this doesn't work without seeing some screenshots, or even better, a copy of your file.

           

          But here are some observations.

           

          Tanner wrote:

          - References set to the appropriate fields:

          the "article_id" from invoiceItem table with the field "article_id" from table "Article"

          the "Description" from invoiceitem table with the field "Description" from the table "Article"
          the "purchase price" from invoiceitem table with the field "purchase price" of table "Article"

           

          Actually, without having a relationship to Article, article_id has nothing useful to refer to – but you need the article_id to have that relationship in the first place, so there's a Catch 22. You cannot use a reference here (whatever that actually means here).

           

          article_id must be a regular field (with the same data type as the primary key in the Article table)

           

          Be aware that you shouldn't reference (as in: within a calculation field) the price from Article; if you do, then later price changes will falsify older invoices. Instead, copy over the price from Article (simply use an auto-enter calculation that references the price field from Product).

           

          This is one of the scenarios in a relational database where copying is the right thing to do. Actually, the same goes for description (though the consequences of using a reference wouldn't be a harmful as with the price).

           

          Tanner wrote:

          - Typing Article_ID in Article-ID of invoiceItem but the filed is empty.

          It's better to use a selection tool – unless you'd rather keep all article IDs in (your) memory … ?!

           

          For starters, a value list with ID and name might do – but if you want to see something more useful, have a look into the attached sample file.

          • 2. Re: Display referenced filed not worked
            Tanner

            Thank you very much.

            I cannot see an attached file.

            I will consider your tipps and will write my feedback as response in the evening.

            • 3. Re: Display referenced filed not worked
              erolst

              Tanner wrote:

              I cannot see an attached file.

              You need to go to the post proper, not just view it in a list view (like an activity stream).