117Alan Posted May 29, 2008 Posted May 29, 2008 Hi I have a field, that returns a calculated value for a person’s age, using the calculation: (Date of procedure - Date of birth) / 365 I would like the number in the age field to turn (for example) red if the persons age is over 70 yrs old, or under 1 year old. I have tried adding: Case (persons age>70; TextColor (persons age ; RGB (255 ; 0 ; 0 ) ); Evaluate ( persons age ) ) But my attempts fail, mostly FileMaker says there is a “operator missing” Could someone please help with the next step to follow my existing calculation? Thanks
comment Posted May 29, 2008 Posted May 29, 2008 How about simply: Let ( age = ( Date of procedure - Date of birth ) / 365 ; Case ( age < 1 or age > 70 ; TextColor ( age ; RGB ( 255 ; 0 ; 0 ) ) ; age ) ) BTW, to calculate the approximate age you should use 365.2425 instead of 365 (leap years!) - or use the formula here to determine the exact age: http://www.fmforums.com/forum/showpost.php?post/150446/
Recommended Posts
This topic is 6076 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now