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.

1 Answer 1

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)

You must log in to answer this question.

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