Discussions

Expand all | Collapse all

Conditional Formula; Shred by Date

  • 1.  Conditional Formula; Shred by Date

    Posted 05-04-2017 16:42
    I am hoping to generate a date field or text field (Shred by Date) based off the following conditions:

    If client's age at discharge is (equal to or > 18) shred by date = discharge date + 7 years. 
    If client's age at discharge is (<18) shred by date = (however many years until the client is 18 + 7 years).

    I currently have the following fields already created, but do not know how to make the appropriate formula for the "shred by date" field.

    Client's DOB
    Client's current age (formula field)
    Client's discharge date
    Client's age at discharge (formula field)


  • 2.  RE: Conditional Formula; Shred by Date

    Posted 05-04-2017 16:51
    If([Client's Age at Discharge]<18,
    [Client's DOB]+Years(25),
    [Client Discharge Date]+Years(7))


  • 3.  RE: Conditional Formula; Shred by Date

    Posted 05-04-2017 17:24
    THANK YOU! Worked perfectly, except I had to use days instead of years. 


  • 4.  RE: Conditional Formula; Shred by Date

    Posted 05-04-2017 18:06
    My mistake on the years.

    A better use is: 

    If([Client's Age at Discharge]<18,
    AdjustYear([Client's DOB], 25),
    AdjustYear([Client Discharge Date], 7))