Filemaker Pro 9 (115) Flashcards
This set entered on 8-3-14
8.2.14.4
Chapter 10. 1. FileMaker has FIVE OPERATORS that specifically apply to NUMERICAL CALCS:
a. +
b. -
c. *
d. /
e. Exponentiation.
- Every number function expects two or more parameters, such as:
NO. ONLY ONE OR MORE PARAMETERS, but the function expects each to have a NUMBER VALUE, AND ALL THE NUMBER FUNCTIONS RETURN A NUMBER RESULT.
- In the last chapter we created two very simple calc fields: Extended Price and Invoice Total. Now we need to expand on it, but need to create an new PRODUCTS TABLE to the database, with the fields:
a. SKU
b. Description
c. Cost
d. Price
- You want to offer a discount to your better customers, but some products have a low markup, so you create a calc to make sure your discount never reduces the markup below 20%. You start with:
a. Calculate 95% of the price:
Price * .95
- Then you figure out the lowest price you can offer:
You know the cost (it is in the Cost Field), so you figure out the lowest price by adding 20% to this cost: Cost * 1.2
- Finally, the DISCOUNTED PRICE is either the CALCULATED DISCOUNT PRICE or the COST PLUS 20%, WHICHEVER IS GREATER. The calc is:
Max ( Price * .95 ; Cost * 1.2 )
- Using the MAX FUNCTION, the previous calc results in:
either the discounted price, or the minimum price, WHICHEVER IS GREATER.
- But what if your regular price has less than a 20% markup? If you use the MAX CALC as it is now, the NEW DISCOUNTED PRICE IS MORE THAN THE NORMAL PRICE. How do you handle this?
You need to add to your calc so that it takes the regular price into account, and USES THAT PRICE if it is LOWER THAN THE CALCULATED DISCOUNT. See the next set of cards for details.