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
Colette OsborneColette Osborne 

validation rule - if two critera are TRUE then record won't save

Hi, I have been doing fairly simple validation rules but am having a Friday problem!

Essentially I am trying to create a validation rule on a custom object:

If a scheme name is set to a specific text string AND a picklist value is a certain value THEN display the error message - you cant save the record - the scheme name should be something other than CAP VG PH12.


AND( if ( CS_Scheme__r.Name," CAP VG PH12 "), AND( ISPICKVAL(Status__c , "filled"),null )
I know the above is not right but really would value some pointers.
thanks
 
Sanjay Mulagada 11Sanjay Mulagada 11
Hello Colette, try this -

AND(
CS_Scheme__r.Name = " CAP VG PH12 ",
ISPICKVAL(Status__c , "filled")
)
kaustav goswamikaustav goswami
AND(
  CS_Scheme__r.Name = "CAP VG PH12",
  ISPICKVAL(Status__c, "Filled")
)

If both the conditiona are true then AND evaluates to true. Please chech for minor syntactical error.

Thanks,
Kaustav
Sanjay Mulagada 11Sanjay Mulagada 11
**Modified** // Removed spaces for Schema Name between the quotes
AND(
CS_Scheme__r.Name = "CAP VG PH12",
ISPICKVAL(Status__c , "filled")
)
Amit K AAmit K A
Try this

AND(
CS_Scheme__r.Name = TEXT("CAP VG PH12"),
ISPICKVAL(Status__c , "filled")
)
Colette OsborneColette Osborne
Thanks for the replies. Much appriciated