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
sudhirn@merunetworks.comsudhirn@merunetworks.com 

Formula not firing

Hi, 

  Below is the formula written which has no error but this is not working when values are changed in forecast category name please suggest me what is the issue with the formula field.  
AND(
 ISCHANGED(ForecastCategoryName),
 OR(
  AND(
   PRIORVALUE(ForecastCategoryName) = 'Pipeline',
   ISPICKVAL(ForecastCategoryName,'Best Case')
  ),
  AND(
   PRIORVALUE(ForecastCategoryName) = 'Pipeline',
   ISPICKVAL(ForecastCategoryName,'Commit')
  ),
  AND(
   PRIORVALUE(ForecastCategoryName) = 'Best Case',
   ISPICKVAL(ForecastCategoryName,'Pipeline')
  ),
  AND(
   PRIORVALUE(ForecastCategoryName) = 'Commit',
   ISPICKVAL(ForecastCategoryName,'Pipeline')
  )
 )
)

Thanks
Sudhir
Arti KulkarniArti Kulkarni
Hi Sudhir,

Since you are using picklist you should try using ISPICKVAL. Try changing your Rule as

AND(
 ISCHANGED(ForecastCategoryName),
 OR(
  AND(ISPICKVAL(PRIORVALUE(ForecastCategoryName),'Pipeline'),
   ISPICKVAL(ForecastCategoryName,'Best Case')
  ),
  AND(ISPICKVAL(PRIORVALUE(ForecastCategoryName) ,'Pipeline'),
   ISPICKVAL(ForecastCategoryName,'Commit')
  ),
  AND(ISPICKVAL(PRIORVALUE(ForecastCategoryName) ,'Best Case'),
   ISPICKVAL(ForecastCategoryName,'Pipeline')
  ),
  AND(ISPICKVAL(PRIORVALUE(ForecastCategoryName) , 'Commit'),
   ISPICKVAL(ForecastCategoryName,'Pipeline')
  )
 )
)

Refer to the PriorValue function in the link given below for more details
https://help.salesforce.com/htviewhelpdoc?err=1&id=customize_functions_i_z.htm&siteLang=en_US

Thanks!
Arati