function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PookyPooky 

Resolved

I am looking for a formula that will allow me to increment someone's age. For example, many times my folks don't capture the birthdate of a spouse, but they do get their age. So, if someone is 64, they want to be notified when the person turns 65. I have created a custom field for age and am trying to create a formula field that increments the age by 1 year from the date when the age was entered.

 

Any help would be appeciated!

Message Edited by Pooky on 01-29-2009 07:56 AM
JCoppedgeJCoppedge
You could use a set of time-based workflow rules.  Create a rule for when age is modified to increment by 1 every 365 days, 730 days, etc.  That solution is far from perfect however, although I can't think of another way that would work.
jrotensteinjrotenstein

Storing Age is never a good idea, since it changes every year. It's always best to store the base date and calculate the age.

 

So, your requirement seems to be:

  • If they DO know the spouse's date of birth, store that date (date field) and display their age (formula field)
  • If they DO NOT know the spouse's date of birth, use 'today' as their date of birth, with their age. This is best done by actually storing a pretend birthday. Eg if today is Feb 1, 2009 and their age is 59, store Feb 1 1950 as their birthdate and the system will calculate the age as 59. Probably a good idea to have a field that flags this as an approximate birthdate, so you don't send flowers on their non-birthday.


Back-calculating the date isn't hard -- take the year and subtract their age. If your users find this simple calculation too hard, you could create a field for "Discovered Age". When it is populated, create a workflow rule that:

  • Subtracts the age (in years) from today's date and stores it in the birthdate field
  • Clear the "Discovered Age" field (since it will change in future and you don't need it anymore)
  • Sets the "Approximate birthday" flag to show that it is not an accurate birthdate

 

So, 4 fields in all:

  • Birthdate (real or approximate)
  • Age (formula using Birthdate and today's date)
  • Approximate Birthday flag (for use when it is not accurate) 
  • Discovered Age (if you want to back-calculate the Birthdate for the users)