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
WPCMSWPCMS 

Validation Field Not Working

Custom Object: Can


Formula: FEL_Monthly__c >0&& isnull( Monthly_Other_Specify__c )=True

I am trying to create an error message when a user enters a currency value in the field FEL Monthly but does not enter a value in field Monthly Other Specify. I have tried the above formula in several ways (with no syntax errors) and it will not return the error when I test it out. Please let me know what I need to change to make it return the error on the object.

Best Answer chosen by Admin (Salesforce Developers) 
MarkSilberMarkSilber

This should work:

 

AND(FEL_Monthly__c > 0, ISNULL(Monthly_Other_Specify__c))

 

For fields that evaluate to "true", you don't need the =True statement since it's implied already by the statement in a validation rule. You also didn't specify what type of field Monthly_Other_Specify__c is -- if it's a text field, the formula would be slightly different. You can't check for nulls in text fields -- you need to check the length instead.

 

AND(FEL_Monthly__c > 0, LEN(Monthly_Other_Specify__c)=0)

 

All Answers

MarkSilberMarkSilber

This should work:

 

AND(FEL_Monthly__c > 0, ISNULL(Monthly_Other_Specify__c))

 

For fields that evaluate to "true", you don't need the =True statement since it's implied already by the statement in a validation rule. You also didn't specify what type of field Monthly_Other_Specify__c is -- if it's a text field, the formula would be slightly different. You can't check for nulls in text fields -- you need to check the length instead.

 

AND(FEL_Monthly__c > 0, LEN(Monthly_Other_Specify__c)=0)

 

This was selected as the best answer
WPCMSWPCMS
It worked! Thank you very much. It was a text field so the second formula was entered. Thanks again.