0

Can someone help me with this syntax:

IF( ISPICKVAL( Type , OR('Block Number', 'Unknown Number')), 1, 0)

I am receiving the following error message:

Incorrect number of parameters for function 'ISPICKVAL()'. Expected 2, received 3 (Related field: Formula)`

I usually use:

IF( ISPICKVAL( Type ,'Block Number'), 1, IF( ISPICKVAL( Type , 'Unknown Number'), 1, 0) 

but there are limited amount of characters one can use in a formula field.

3

Try this:

IF( 
    OR(ISPICKVAL( Type , 'Block Number'),
        ISPICKVAL( Type , 'Unknown Number')),
    1,
    0
)

Compiled size: 44 characters

or this:

Case(Type,
    'Block Number', 1,
    'Unknown Number', 1,
    0)

Compiled size: 52 characters (cleaner, flexible but uses more characters)

You can use any one of above, where as formula which you usually use:

IF( ISPICKVAL( Type ,'Block Number'), 1, IF( ISPICKVAL( Type , 'Unknown Number'), 1, 0) )

Compiled size: 86 characters (difficult to maintain)

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.