Calculated field on decimal field for text

I would like to create a new calculated textfield field based on business_hours field (decimal type) that returns a value of "Met" or "Missed"

for when the business_hours field is not empty

based on 

if the field CaseType = RFQ and business_hours is less than or equal to 4 hours

or

if the CaseType is equal to (RFI or NCO or ORD) and business_hours is less than or equal to 8 hours

"Met"

Else

"Missed"

Parents
  • hi  

    Try the following SugarLogic formula:

    ifElse(
    and(
    not(equal($business_hours, "")),
    or(
    and(
    equal($CaseType, "RFQ"),
    lessThanOrEqual($business_hours, 4)
    ),
    and(
    or(
    equal($CaseType, "RFI"),
    equal($CaseType, "NCO"),
    equal($CaseType, "ORD")
    ),
    lessThanOrEqual($business_hours, 8)
    )
    )
    ),
    "Met",
    "Missed"
    )

    Let me know if your CaseType field is a dropdown or a related field — if it's a related field, the formula may need adjustments.

    .

    CRM Business Consultant

Reply
  • hi  

    Try the following SugarLogic formula:

    ifElse(
    and(
    not(equal($business_hours, "")),
    or(
    and(
    equal($CaseType, "RFQ"),
    lessThanOrEqual($business_hours, 4)
    ),
    and(
    or(
    equal($CaseType, "RFI"),
    equal($CaseType, "NCO"),
    equal($CaseType, "ORD")
    ),
    lessThanOrEqual($business_hours, 8)
    )
    )
    ),
    "Met",
    "Missed"
    )

    Let me know if your CaseType field is a dropdown or a related field — if it's a related field, the formula may need adjustments.

    .

    CRM Business Consultant

Children