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

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 :)

| improve this answer | |
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()
| improve this answer | |
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")
| improve this answer | |
0

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.