0

What function should I use for validation rule as I want a validation rule to be used if I select a value from a picklist. for example, IsChanged can be used for updating the record. I cant use IsNew as Salesforce is giving an error that it cant be used with a picklist.

Thanks in advance

4 Answers 4

1

You can do it using this way

TEXT( Status__c ) = 'Hired'

here Status__c is my picklist and Hired is one of the value for which I am checking error condition in my validation formula.

You can also do the same thing this way:

ISPICKVAL(Status__c, 'Hired')

Hope this helps :)

1

You can use ISNEW() in combination with a picklist field you should be able to do something like this:

ISPICKVAL(PicklistField, "Value") && ISNEW()  

Which basically says error if the picklist field equals this value and the record is new.

ISNEW Checks if the formula is running during the creation of a new record and returns TRUE if it is. If an existing record is being updated, this function returns FALSE.

ISNEW()
0

You want to use ISBLANK with TEXT to check to see if the field has a value or not.

ISBLANK(TEXT(My_Field__c))

If you need to check to see if the picklist is a specific value, use ISPICKVAL

ISPICKVAL(My_Field__c, "Some Value")
0

ISPICKVAL(Picklistvalue__c, "Some Value") && NOTISPICKVAL(Picklistvalue__c, "Some Value")

You must log in to answer this question.

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