1 Reply Latest reply on Aug 2, 2013 8:07 AM by philmodjunk

    Calculation using second value in DropDown List (cost) * Quantity

    ChrisNixon

      Title

      Calculation using second value in DropDown List (cost) * Quantity

      Post

           Hey guys, I have two tables...

           Entry

           =============================================

           Date (Calender) / Case Number (Editbox) / Item (Dropdown) / Quantity (Editbox) / Total (Calculation)

            

           Items

           =============================================

           Item (text) / Cost (currency)

            

           On my Entry form, the Item dropdown is populated with values from the Items table, showing both values (Item/Cost), so that the user can select the item they want, and see the cost for that item as well. What I need to happen is have a Calculation in the Total editbox that multiplies the second value of the Item selection TIMES the number entered by the user in the Quantity editbox. Any help would be greatly appreciated?

            

           Thanks!

        • 1. Re: Calculation using second value in DropDown List (cost) * Quantity
          philmodjunk

               This is an unusual way to set this up. Normally, you select an item from a value list where the first field is a (usually) hidden ID number and the second field is a product name or description. Selecting the product by name enters the ID number into the field and links it to a related table of products where you have one record for each product with a unit price field. A relationship combined with an auto-enter field option then copies the current price for that item from the table of products into the table of line items in a portal on your invoices layout. You can see an example of this in the invoices starter solutions that come with your copy of either FileMaker 11 or 12.

               Using what you have, you could define a relationship like this:

               Entry::item = Items::Item

               And then you can use the relationship to access Items::Cost once you have selected an item in your value list. But it's really not the best approach to use here.