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
    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 '18 at 22:14
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
    )
)
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.