function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sudhIr NarayansudhIr Narayan 

Multiple If Condition

Hi, 

  How to add multiple IF condition  Please suggest am getting error
 
IF
(
ISPICKVAL(StageName,'Closed Won') ||
ISPICKVAL(StageName,'Closed Other') ||
ISPICKVAL(StageName,'Closed Direct') ||
ISPICKVAL(StageName,'Closed VAR') ||
ISPICKVAL(StageName,'Closed Partial') ||
ISPICKVAL(StageName,'Closed Received') ||
ISPICKVAL(StageName,'Closed End User to VAR') ||
ISPICKVAL(StageName,'Closed VAR to Disty') ||
ISPICKVAL(StageName,'Closed Disty to Meru') 
)
IF( NSP_Not_Appoved_Count__c  > 0 )

 
James LoghryJames Loghry
What error are you getting?

You're already OR'ing a bunch of ISPICKVAL conditions, why can't you simply add "NSP_Not_Approced_Count__c to that list as well?

Additionally, it looks like you're missing the TRUE and FALSE values.  For instance, what you want the result of the formula to be if the ISPICKVAL criteria are met, versus what result you want if they are not met.
IF
(
    OR(
        ISPICKVAL(StageName,'Closed Won') 
        ,ISPICKVAL(StageName,'Closed Other')
        ,ISPICKVAL(StageName,'Closed Direct')
        ,ISPICKVAL(StageName,'Closed VAR')
        ,ISPICKVAL(StageName,'Closed Partial')
        ,ISPICKVAL(StageName,'Closed Received')
        ,ISPICKVAL(StageName,'Closed End User to VAR')
        ,ISPICKVAL(StageName,'Closed VAR to Disty')
        ,ISPICKVAL(StageName,'Closed Disty to Meru')
        ,NSP_Not_Approved_Count__c > 0
    )
    ,//Expected value if TRUE
    ,//Expected value if FALSE
)

 
Michael VerhovskiMichael Verhovski
What error are you getting?