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
Kerby Court 3Kerby Court 3 

OR/AND formula syntax error, can't seem to find the solution. Help please.

I'd want my formula to walk through three sets of critiera, find the 'TRUE' set and display the corresponding graphic. If none of the three sets are 'TRUE', then display the 'default' graphic. 

I've started testing with 2 sets of criteria and keep getting: "Error: Incorrect parameter type for function 'OR()'. Expected Boolean, received Text". I'm very new to this and cannot seem to find the syntax fix. The basic formula is cobbled together from things I've learned in this community. I'd appreciate any help in sorting out how to get the syntax correct.

IF(
OR(
AND(
TEXT(Plan_Status__c) ="Signed (Complete)",
(Release__c), TRUE,
(Statement__c), TRUE,
(Premium_Breakout__c), TRUE,
(Detail__c), TRUE,
(History__c), TRUE), IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JO","One_Green_Check"),
OR(
AND(
TEXT(Plan_Status__c) ="Signed (Complete)",
(Release__c), TRUE,
(Statement__c), TRUE,
(Premium_Breakout__c), TRUE,
(Detail__c), TRUE,
(History__c), TRUE,
TEXT(Report_Status__c)= "Verified"), IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JT","Two_Green_Checks"),
IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JJ", "Three_Xs"))))

Thanks in advance for the help. 
Best Answer chosen by Kerby Court 3
Akhil AnilAkhil Anil
Hi Kerby,

Your formula will be like this
 
IF(
AND(
TEXT(Plan_Status__c) = "Signed (Complete)",
Release__c,
Statement__c,
Premium_Breakout__c,
Detail__c,
History__c,
TEXT(Report_Status__c)= "Verified"
),
IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JT","Two_Green_Checks"),
IF(
AND(
TEXT(Plan_Status__c) = "Signed (Complete)",
Release__c,
Statement__c,
Premium_Breakout__c,
Detail__c,
History__c
),
IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JO","One_Green_Check"),
IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JJ", "Three_Xs")
)
)

Kindly mark it as an answer if that works !

All Answers

Akhil AnilAkhil Anil
Hi Kerby,

Your formula will be like this
 
IF(
AND(
TEXT(Plan_Status__c) = "Signed (Complete)",
Release__c,
Statement__c,
Premium_Breakout__c,
Detail__c,
History__c,
TEXT(Report_Status__c)= "Verified"
),
IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JT","Two_Green_Checks"),
IF(
AND(
TEXT(Plan_Status__c) = "Signed (Complete)",
Release__c,
Statement__c,
Premium_Breakout__c,
Detail__c,
History__c
),
IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JO","One_Green_Check"),
IMAGE("/servlet/servlet.FileDownload?file=01536000002K6JJ", "Three_Xs")
)
)

Kindly mark it as an answer if that works !
This was selected as the best answer
Kerby Court 3Kerby Court 3
Thanks Akhil! This worked perfectly. I will use it as the basis of building in the third set of criteria. Really appreicate your help. Amazing.