Calculated Date Field With Multiple Conditions

Hello,

I'm trying to get a Call Due Date calculated based off two Call conditions:

1. Call Type is "Account Management Call"

2. Call Status is "Held"

I have the formula below, that is producing a Call Due Date despite the conditions and listening to the default value of "0" even if none of the Conditions match.

ifElse(
equal($keycontact_c,true),
addDays($last_call_date_c,
ifElse(
and(
equal(related($calls,"call_type_c"),"Account Management Call"),
equal(related($calls,"status"),"Held")),
30,
0
)
),
date("")
)

How can I get this to work so that if a Call is "Held" and is marked as an "Account Management Call" a Call Due Date is calculated 30 days out? If those criteria do not match, a Call Due Date should not be assigned.

Parents
  • Thanks. I'm not sure if I really understand?

    Although, we're trying to go the route of a different call type - if that's what you were suggesting? But still having issues with the formula.

    ifElse(
    equal($keycontact_c,true),
    addDays($last_call_date_c,
    ifElse(equal(related($calls,"call_type_c"),"Account Management Call"),
    30,
    ifElse(equal(related($calls,"call_type_c"),"Account Management Attempt"),
    7,
    ""
    )
    )
    ),
    date("")
    )

    We want it so that if:

    Call Type = "Account Management Call" a call due date is calculated for 30 days from Last Call Date

    Or, Call Type = "Account Management Attempt" a call due date is calculated for 7 days from Last Call Date

    If the Call Type does not match, the call due date should be left blank.  However, all Calls are being set to the same day as the Last Call Date. What is wrong with this formula?

Reply
  • Thanks. I'm not sure if I really understand?

    Although, we're trying to go the route of a different call type - if that's what you were suggesting? But still having issues with the formula.

    ifElse(
    equal($keycontact_c,true),
    addDays($last_call_date_c,
    ifElse(equal(related($calls,"call_type_c"),"Account Management Call"),
    30,
    ifElse(equal(related($calls,"call_type_c"),"Account Management Attempt"),
    7,
    ""
    )
    )
    ),
    date("")
    )

    We want it so that if:

    Call Type = "Account Management Call" a call due date is calculated for 30 days from Last Call Date

    Or, Call Type = "Account Management Attempt" a call due date is calculated for 7 days from Last Call Date

    If the Call Type does not match, the call due date should be left blank.  However, all Calls are being set to the same day as the Last Call Date. What is wrong with this formula?

Children
No Data