3 Replies Latest reply on Jan 17, 2011 11:38 AM by philmodjunk

    Varied Pricing

    RicBruce

      Title

      Varied Pricing

      Post

      I am developing an invoicing solution.  Many products are priced as a set pricing (i.e. labor for installation is $10).

      Others are priced by the square foot.  Others are priced by the square yard.  Others are priced using a custom price matrix(where the price is a function of width and height, but with no direct calculation involved).

      My question is how do I set up the relationship within the portal so that I am able to select any of the products and get a price?

      If the product does not require a width or length, then there will be no need to enter one.  Likewise if the product needs a specified dimension, then those fields will be required.

      Much thanks

      Ric

        • 1. Re: Varied Pricing
          philmodjunk

          For many of those situations, you can check out the evaluate function. You can store the calculation expression for a given item in a pricing table and then you look up the calculation and use evaluate to apply it to the current record.

          For your matrix solution, I'd try real hard to generate a calculated expression that produces the same results as the matrix as that will be easier to implement. If that isn't possible, you can use a separate look up to look up the values from  your matrix and an auto-enter calculation can select from either source (Price list or pricing matrix) based on values you've entered in the invoice line item record for that item.

          • 2. Re: Varied Pricing
            RicBruce

            Let me make sure I understand.  I am fairly new to Filemaker.  

            Make a pricing table.  In this table I will have ALL the products.

            Enter the Product on the Invoice(using a Lines portal). 

            How would the customer know whether to enter a width or length?  What about whether the products have certain limitation?

            Ric

            • 3. Re: Varied Pricing
              philmodjunk

              This is not something that will be simple to set up. But all of that can be looked up from the products (pricing) table--including text that instructs the user as to what should be entered.

              In simple form, you can have a table like this:

              ProductID       Price                              Instructions
              123                 10
              234                  .05 * Length * width   Enter length and width in inches

              Your relationship:
              LineItems::ProductID = Products::ProductID

              An auto-enter calculation might look like this:

              Evaluate ( Products::Price )

              Where length and width are fields defined in the LineItems table.

              Another option that may work is to define the calculations in the LineItems table, but control which calculation is used by a value or value looked up from the Products table.

              Regardless of how you set it up, a good basic table structure with the correct relationships is essential. Just to get you started on the right foot, here's a demo file, created by Comment, that shows the typical table structure for an invoice system. It does not use the above method for calculating prices, but does show the basic layout and table structure you can use:

              http://fmforums.com/forum/showpost.php?post/309136/