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
KbhaskarKbhaskar 

validation rule amount

hi have an error  where need to save amount with respect to record types
Error: Syntax error. Found ')'
AND(
OR(
Amount<10000,
Amount<>10000,
OR(
$RecordType.Name="Small Opportunities",
$RecordType.Name="Big Opportunities",
)))
Abhishek BansalAbhishek Bansal
Hi Bhaskar,

Please change syntax as mentione below :

AND(
OR(
Amount<10000,
Amount<>10000,
OR(
$RecordType.Name="Small Opportunities",
$RecordType.Name="Big Opportunities"
)))
William TranWilliam Tran

Something is wrong with your logic, 

1) OR(
Amount<10000,
Amount<>10000,

since <10000 is already covered in <>10000, you don't need both, or change your criteria

2) Why have an AND when there're just one OR in there, so look at you logic and see if you meant to have many ORs


Base on what you wrote, I believe you are trying to do this:
 
AND(
Amount<>10000,
OR(
$RecordType.Name="Small Opportunities",
$RecordType.Name="Big Opportunities"
))

As a common practice, if your question is answered, please choose 1 best answer. 
But you can give every answer a thumb up if that answer is helpful to you. 

Thanks
KbhaskarKbhaskar
Hi,
I came close to my solution it was the problem with logic.  thanks a lot William Tran & Abhishek Bansal


 
William TranWilliam Tran

Bhaskar,  glad you figure it out, if your question is answered, please choose a best answer. 

Thanks