1

I have a checkbox called 'Company_Address_Complete__c', that I want to ensure is checked before someone can advance to Won, Lost or Project closed. Can someone tell me why this is failing with this error: "Error: Incorrect argument type for function 'ISBLANK()'."

AND (
  OR (
     ISPICKVAL(StageName, "Opportunity Won"),
     ISPICKVAL(StageName, "Opportunity Lost"),
     ISPICKVAL(StageName, "Project Closed")),   
     ISBLANK(  Company_Address_Complete__c  )
)
1
  • 1
    FYI you can format your code by hitting the {} button in your editor, or selecting the block and hitting CTRL+K.
    – Adrian Larson
    Jun 4, 2018 at 22:14

1 Answer 1

2

If you want to throw an error when the checkbox is unchecked, you would do:

NOT(My_Checkbox__c)

So your formula should look like:

AND(
    NOT(Company_Address_Complete__c),
    OR(
        ISPICKVAL(StageName, ...),
        ISPICKVAL(StageName, ...),
        ISPICKVAL(StageName, ...)
    )
)

Note it's more efficient to switch your OR statement to a CASE:

AND(
    NOT(...),
    1 = CASE(
        TEXT(StageName),
        "Opportunity Won", 1,
        "Opportunity Lost", 1,
        "Project Closed", 1,
        0
    )
)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .