Database Reference
In-Depth Information
So the date of the first day of next month is:
Date ( Month(Order Date) + 1 ; 1 ; Year(Order Date) )
To get the value of 2 days before the end of any month, just subtract 3 from the whole thing:
Date (
Month(Order Date) + 1; // the _next_ month
1; // the _first_ day
Year(Order Date) // the same year
)- 3 // subtract 3 days
It may look a little confusing at first, but it's much shorter than the page you'd need to work
the calculation out longhand. And it works perfectly every month of every year.
Containers in Calculations
Although it isn't a typical calculation data type, you can do a few interesting things with con-
tainer fields in calculations. You don't have the same vast options you do with other types. It
would be great if you could subtract Cousin Clem.jpg from Family Reunion.jpg to get the
scoundrel out of the picture, but alas, the technology isn't quite there yet. Nevertheless,
FileMaker doesn't leave containers entirely out in the cold when it comes to calculations.
Calculations with Pictures, Sounds, Movies, and Files
When you create a calculation field, you can set its result type to Container. You can't create
container data in a calculation, but you can refer to other container fields. When you do, the
picture, sound, movie, or file in the referenced container field shows in the new calculation
field.
You can, for example, make a calculation field that shows the contents of one container field
when you're in Browse mode, and another in Preview mode. This field lets you use low-res-
olution images when you view on the screen and higher resolutions when you view in print.
(You'll learn how to create decision-making calculations in Chapter 16 .)
You may also want to use container fields in a calculated replace. Suppose you have a found
set of 30 records that don't have a low-resolution image. You have to have something in that
field, so you decide to take the high-resolution image for those few records and plunk them
down in the low-resolution image field. Choose Records→Replace Field Contents and then
perform this calculated replace:
Graphics::High Resolution Image
Search WWH ::




Custom Search