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
SFDC n12SFDC n12 

Validation help needed

Hi,

I am having a requirement for which i need help

I am having a picklist field called as "Type" and a dependent picklist called "Subtype"

If i select the value of the field "type" to a specific value and subtype to a specific value , 

I have another currency field "Smartauction_Amount_of_Current_Exception__c" which should not be blank on saving the record


So i have written a valdiation rule below as follows,

IF
(
AND
(
NOT(ISBLANK(SmartAuction_Number_of_Contracts__c)),
ISBLANK(Smartauction_Amount_of_Current_Exception__c)

), true, false
)



Its working fine , but another requirement is

Even if the value is "0"  for the field "Smartauction_Amount_of_Current_Exception__c"  also it should not save it should have a valid number apart from "0" 


Help me how to achieve this 

Thanks in Advance


Best Answer chosen by SFDC n12
Blessy Voola 4Blessy Voola 4
 Could you check if this works
if(
and
(
not(isblank(SmartAuction_Number_of_Contracts__c)), or(isblank(Smartauction_Amount_of_Current_Exception__c),Smartauction_Amount_of_Current_Exception__c=0)),true,false)

All Answers

Blessy Voola 4Blessy Voola 4
 Could you check if this works
if(
and
(
not(isblank(SmartAuction_Number_of_Contracts__c)), or(isblank(Smartauction_Amount_of_Current_Exception__c),Smartauction_Amount_of_Current_Exception__c=0)),true,false)
This was selected as the best answer
rohitsfdcrohitsfdc
Try this

IF
(
AND
(
NOT(ISBLANK(SmartAuction_Number_of_Contracts__c)),
OR(ISBLANK(Smartauction_Amount_of_Current_Exception__c),Smartauction_Amount_of_Current_Exception__c=0)

), true, false
)