You need to sign in to do that
Don't have an account?
PubNoah
Validation to not allow a field to be populated based on conditions
Hi,
I'd like to use a validation rule to say that if a certain value is selected in a pick list, a currency field MUST be left blank in order to save the case. I have used validations before saying that if a field value is selected, a field is MANDATORY, but not the other way around. Details below:
Controlling pick list: Integration__c
Value: "PCI"
Currency field name: Publisher_CPM__c
Can you help? Thanks so much!
PubNoah,
Try IF(AND(ISPICKVAL( Integration__c, "PCI"), NOT(ISNULL( Publisher_CPM__c))),TRUE,FALSE)
OR
IF(AND(ISPICKVAL( Integration__c, "PCI"), ( Publisher_CPM__c != NULL)),TRUE,FALSE)
Please check the syntax, as I did not validate above in salesforce. but at a higher level this is how you need to write your validation for the requirement you specified.
Hope it helps.
All Answers
PubNoah,
Try IF(AND(ISPICKVAL( Integration__c, "PCI"), NOT(ISNULL( Publisher_CPM__c))),TRUE,FALSE)
OR
IF(AND(ISPICKVAL( Integration__c, "PCI"), ( Publisher_CPM__c != NULL)),TRUE,FALSE)
Please check the syntax, as I did not validate above in salesforce. but at a higher level this is how you need to write your validation for the requirement you specified.
Hope it helps.
Thanks, User@SVF! That worked! (the first one)
One other question... How can I make it multi-fields must be blank. So, if PCI is selected, "Publisher_CPM__C" and "DP_CPM__C" must both be blank?
Sorry, new to this and still getting the hang.
Thanks!
PubNoah,
try the following.
IF(AND(ISPICKVAL( Integration__c, "PCI"), AND( (NOT(ISNULL( Publisher_CPM__c))), (NOT(ISNULL( Publisher_CPM__c)))) ),TRUE,FALSE)
- Please check the syntax.
*** When you go to the edit page for writing the formula, on the right hand side you will have the list of functions available for validations and also a short description will be given below, along with examples on how to used the function.
Thanks,
I can't figure this out... Here is what I have. Any ideas?
IF(AND(ISPICKVAL(TEST_Integration__c, "PCI")), OR(ISPICKVAL(TEST_Integration__c, "PCG")), OR(ISPICKVAL(TEST_Integration__c, "PCGH")), NOT(ISNULL( Publisher_CPM__c))),TRUE,FALSE)
please post your exact requirement & field names... so that I can build your validation rule.
Thanks! Conditions below. I keep trying to use Excel statements, and it's not working out for me. :)
Controlling pick list: Integration__c
Values, in quotes: "PCI" "PCG" "PCGH"
Currency field names, separated by comma: Publisher_CPM__c, DP_CPM__c
To sum it up, if any of those values are picked in the designated pick list, the record should not be able to be saved if there is a value in either of the noted fields.
Thanks!
Please try this.
Thanks,
Worked like a charm!