Filemaker Pro 9 (116) Flashcards
1
Q
This set entered on 8-3-14
8.2.14.5
- When calcs start to get complicated like the DISCOUNT PRICE example, you need to:
A
imagine that you have a field that contains THE VALUE YOU ALREADY WANT. You can use this PRETEND field in your calc, and then, when you are all finished, put the old calc in place of the pretend field.
2
Q
- In this case, just pretend you have a field called:
A
CALCULATED DISCOUNT, that holds the DISCOUNT PRICE.
3
Q
- With that IMAGINARY FIELD, you can fix the problem with this calc:
A
Min ( Calculated Discount ; Price)
4
Q
- The result of this calc is:
A
either the CALCULATED DISCOUNT or the REGULAR PRICE (if it is lower).
5
Q
- Now, just put the OLD CALC in place of the words:
A
CALCULATED DISCOUNT (since the old calc results in the CALCULATED DISCOUNT).
6
Q
- The finished calc is, including comments, is:
A
/* returns the calculated discounted price or the original price, whichever is lower*/
Min ( Max (Price * .95 ; Cost * 1.2 ) ; Price )