1 Reply Latest reply on Dec 4, 2016 3:11 PM by erolst

    How can i setup price totalling for a table?

    leffen

      So I've been building a shopping app slowly (painfully slowly) and ive gotten to the stage where i want to be able to calculate the prices of items within a table. i cant seem to find any information anywhere regarding this, im also new to filemaker and as my solution is hosted to a server i cant just upload it to here. so if anyone could help or needs more information to help just ask and i will provide as much as i can

       

      Here is my relationship Layout its a mess but again im new and learning, and ideas or constructive criticism is appreciated

      the last photos is of the tables i have and the fields within, if anymore information is needed and i will supply i just want to get this feature solved

       

       

      Thankyou

        • 1. Re: How can i setup price totalling for a table?
          erolst

          Hmm, it depends in what you mean by "summing prices in a table", ie under which circumstances.

           

          You might find this helpful:

           

          FileMaker Pro 15 Help (Summary fields)

           

          Note that were it reads "multiple records", that could of course be all records in a table, or a found set you get as the result of a Find (all invoices in the 1. quarter) or by following a relationship (all line item records related to an invoice record - or, for that matter, a shopping cart).

           

          There is also the Sum() function that allows you to total a field from all records related to a parent.

           

          But a summary field is more versatile: in

           

          Cart --< LineItems >-- Product

           

          you'd need a Count() calculation field of line item prices in both parents - and still couldn't total those prices in a list layout of LuneItemd.

           

          But if you create a Total of: extendedPrice (price x qty) in LineItems, you can not only total those records, but also display that field in both parent tables:

           

          In Cart, you get a total of the extended prices for all products in the current cart; in Product, you'll get a total of that product's extended prices in all carts (which may not be totally useful ...)