3 Replies Latest reply on Oct 2, 2014 2:00 PM by philmodjunk

    Please help...

    nader

      Title

      Please help...

      Post

      Thank you all for reading this post.

      i have a little problem and I hope I can get a solution here.

      i have a database containing three tables, clients, items, invoice, in client layout, a portal of items related to clients table by client_fk, in the first field a drop down menu of items, my goal is to be able to choose an item fromdrop down  list, get the price of the item selected in the next field of the portal and then set a button on the same portal row to transfer these data to invoice table. 

      If this is a simple operation please excuse my ignorance since I am new in file maker and still learning.

      thank you all. 

        • 1. Re: Please help...
          philmodjunk

          it would seem that you are missing a table and I would suggest a different design as well. Most invoicing systems are built around this set of basic tables and relationships:

          Clients-----<Invoices----<LineItems>------Products

          Clients::__pkClientID = Invoices::_fkInvoiceID
          Invoices::__pkINvoiceID = LineItems::_fkInvoiceID
          Products::__pkProductID = LineItems::_fkProductID

          For an explanation of the notation that I am using, see the first post of: Common Forum Relationship and Field Notations Explained

          with such a setup, you'd create a new record on an Invoices layout, select a client in _fkClientID to link it to a client and then use a portal to LIneItems to specify what items are being sold on that Invoice. Fields in LineItems both look up and calculate item cost based on a unit price copied from Products and a quantity specified in a lineItem field by the user. Calculation fields in Invoices would compute the total cost of the invoice and any applicable taxes.

          The Invoice starter solutions that come with FileMaker 11, 12 and 13 are based on this basic approach though versions 12 and 13 refer to LineItems as "invoiceData" instead of "lineItems".

          Caulkins Consulting, Home of Adventures In FileMaking

          • 2. Re: Please help...
            nader

            Thank you so much for your reply.

            is there a script approach to this? 

            • 3. Re: Please help...
              philmodjunk

              There are scripts that can be used to improve on the user experience but the basic set up does not require any scripts, Just relationships, calculations and auto-enter field options.