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
Chris Jones 76Chris Jones 76 

Please anyone help with this formula?

Hi all, 

I have the following error: The formula expression is invalid: Incorrect parameter type for function 'AND()'. Expected Boolean, received Text

With regard to the following Formula: IF (AND(AND( ([Opportunity].Amount >= 50000), TEXT ([Opportunity].StageName) = "20% - Need Identified / Initial Discussions"), TEXT ([Opportunity].Pricing_Status__c) = "Discounted Below Price Book", "Discounted Within Role Remits"))

Any insight, would be greatly appreciated. 
Thank you
GauravGargGauravGarg
Hi Chris,

Line "Discounted Within Role Remits" is not being checked with any condition hence it is being treated as Text value. 

Please check if we require this line for some purpose. 

For more you can directly connect me on skype: gaurav62990.
 
Thanks,
Gaurav
 
Chris Jones 76Chris Jones 76
Hi Gaura, 

Apologies I do not have access to skype. I am trying to say that if Opportunity Pricing Status is either Discounted Below Price Book or Discounted Within Role Remits. I tried inputing OR in between the two values but it did not work. 

Any suggestions would be really appreciated. 

Thank you.
Chris
GauravGargGauravGarg
Hi Chris,

Could you try below formula:
IF (
	AND(
		AND( 
		[Opportunity].Amount >= 50000, 
		TEXT ([Opportunity].StageName) = "20% - Need Identified / Initial Discussions", 
		OR(
			TEXT ([Opportunity].Pricing_Status__c) = "Discounted Below Price Book",
			TEXT ([Opportunity].Pricing_Status__c) = "Discounted Within Role Remits"
			)
		)
	)
)


Thanks,
Gaurav