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
Bev Cheshire 12Bev Cheshire 12 

Update Check Box when a contact begins their 19th year (age)

Hi all, 

Need some assistance and easiest, preferably no code, way of doiing the following

We have the following fields at present
Age_c
Birthdate
U18_subscribed_c
Deceased_c

We need to update the U18_subscribed_c checkbox to false when the following applies

Birthdate is blank
Age is 18 but in the year of their 19th birthday
Deceased is false

If the date hits 01/01 of the year of the contacts 19th birthday the U18_subscribe_c should update to false
If the Deceased field is set at true the U18_subscribe_c should update to false
If the Birthdate field is completed the above should calculate correctly

Any suggestions will be appreciated
hybin joseph 2hybin joseph 2
Hi Bev,

How is the Age field calculated is it a Formula field which changes when its the persons birthday or is it manually inserted??
Bev Cheshire 12Bev Cheshire 12
The Age field is a formula field 

FLOOR((TODAY()- Birthdate +1)/365.2425)
hybin joseph 2hybin joseph 2
Hi Bev,

Can u try this and lemme know if it worked :
 
IF (ISBLANK( Birthdate) , FALSE,
 IF (hybinjoseph1__Deceased__c = FALSE,FALSE,
 IF (hybinjoseph1__Age__c = 19, TRUE,FALSE)))

I am assuming u already have a checkbox field created for U18_subscribed_c so ull need to create a workflow to update this the Condition just needs to be TRUE and the Field Update Action needs to be the formula Above.. Try this and lemme know if uhave questions..
Bev Cheshire 12Bev Cheshire 12
This is only working on the age being 19, and it has to be the 19th year of the contact so the contact's could be 18 as their birthdate may not be until May of that year. 

If it was just the age being 19 then it would be simple - I don't think this can be done with out a trigger or batch job
 
hybin joseph 2hybin joseph 2
Hmmm Lemme try I am not that great with formulas but am sure its possible thru formula lemme try and see if I can achieve this. Will keep u updated.
hybin joseph 2hybin joseph 2
Bev Can u try this :
 
OR(

IF (ISBLANK( Birthdate) , FALSE,
IF (hybinjoseph1__Deceased__c = FALSE,FALSE,
IF (YEAR(TODAY())- (YEAR( Birthdate )) = 19,FALSE,TRUE))))

Lemme know if that worked
Akhil AnilAkhil Anil
Hi Bev,

Give this a shot !
 
IF(
OR(
ISBLANK(Birthdate),
(YEAR(TODAY()) - YEAR(BirthDate)) > 18,
Deceased__c = TRUE
),
FALSE,
TRUE
)