1 Reply Latest reply on Oct 20, 2010 8:22 AM by philmodjunk

    If this then this formula

    yourlightlink

      Title

      If this then this formula

      Post

      Hi. I have a small business and have 3 products with different prices. I am trying to develop a database with just one page [besides the separate invoice pages] and I am struggling with figuring out the coding for a "if this then this" formula. 

      The issue is this. 3 products. 3 different prices. With x number of quantity.

      This is the formula I need:

      If P=1 then X * 9.95

      If P=2 then X * 6.00

      If P=3 then X * 14.95

      3 fields that need to be unified like so. I have it set up with the radio button option for the product. I can multiply the quantity by only one of the prices and need to have the multiplied amount subject to which product is chosen.

      Can anyone help?

      Thanks.

      Screen_shot_2010-10-20_at_10.42.11_AM.png

        • 1. Re: If this then this formula
          philmodjunk

          This is a typical invoicing set up. FileMaker 11 comes with an invoices starter solution you can examine to get ideas and here's an even simpler demo file you can look at that was created by Comment:  http://fmforums.com/forum/showpost.php?post/309136/

          Both examples use a related table of product prices which are copied into your LineItems table via FileMaker's Looked Up Value field option.

          Using your values for an example, if you enter the ID for Product 1, 9.95 is looked up. If you enter the ID for Product 2, 6.00 is looked up and so forth. This allows you to change prices and add or remove products simply by editing the records in this related table and you can compute the line item cost with a simple formula:  QuantityField * LookedUpUnitPrice.