A READER ASKS: Adding Years Based Upon Content

From Dwayne Wright - Certified FileMaker 9 Developer
WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright

I am wondering if you could spare me 2 seconds to answer this very puzzling question.
I have to create a calculation field that will add 5, 2 or 1 year to an examination date depending on both a) the persons age (50 or less is 5 years, between 50-60 is 2 years and over 60 is yearly ) and b) their category

Well, you are going to need to use the following date related functions...

The Date Function
The Day Function
The Month Function
The Year Function

To make it easier, you might want to create a calculation field that returns a 5, 2 or 1 based upon your data input for the persons age and category. Say this field is called DateAddOn. Making sure this is working first, will allow you to then move on to the date calculation.

So you will want to add to the year, the DateAddOn value, so it looks something like ...

Date (
month(Get ( CurrentDate )) ;
day(Get ( CurrentDate )) ;
year(Get ( CurrentDate )) + DateAddOn )

NOTE: You could put the working calculation from the DateAddOn field right into the calculation and have just one field. Thing is, I would make sure it is all working first.
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2008 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.

====================== ADVERTISEMENT ==============================
To check out the online FileMaker Crosswords, please visit /crossword.html