You need to sign in to do that
Don't have an account?
Sean Clark
Error: Incorrect parameter type for function 'or()'. Expected Boolean, received Text
I'm building a Formula (Text) field to display documents when certain criteria is hit. The formula is below.
IF(
Candidate__r.Company_Group_Type_Text__c == 'Potentials',
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qF', ''),
IF(
Candidate__r.Company_Group_Type_Text__c == 'Trusted',
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qZ',''),
IF(
Candidate__r.Company_Group_Type_Text__c == 'Associate',
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qK', ''),
IF(
Candidate__r.Company_Group_Type_Text__c == 'Influencer',
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qU', ''),
IF(
Candidate__r.Contact_ID__c == '0030Y00001JQUHr',
IMAGE('/servlet/servlet.FileDownload?file=0151j000000DoLm', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 7 && Source_Date__c <= TODAY(),
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp1y', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 14 && Source_Date__c <= TODAY() - 8,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3f', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 21 && Source_Date__c <= TODAY() - 15,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3G', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 28 && Source_Date__c <= TODAY() - 22,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3V', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 7 && Source_Date__c <= TODAY()&& Candidate__r.Company_Group_Type_Text__c == 'Influencer' || 'Potentials' || 'Trusted' || 'Associate',
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp1y', ''),
IF(
Source__c == 'Vacancy Lead' && Candidate__r.Company_Group_Type_Text__c == 'Influencer' || 'Potentials' || 'Trusted' || 'Associate' && Source_Date__c >= TODAY() - 14 && Source_Date__c <= TODAY() - 8,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3f', ''),
IF(
Source__c == 'Vacancy Lead' && Candidate__r.Company_Group_Type_Text__c == 'Influencer' || 'Potentials' || 'Trusted' || 'Associate' && Source_Date__c >= TODAY() - 21 && Source_Date__c <= TODAY() - 15,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3G', ''),
IF(
Source__c == 'Vacancy Lead' && Candidate__r.Company_Group_Type_Text__c == 'Influencer' || 'Potentials' || 'Trusted' || 'Associate' && Source_Date__c >= TODAY() - 28 && Source_Date__c <= TODAY() - 22,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3V', ''),
NULL
)))))))))))))
The highlighted section i have recently added and is the issue, it doesn't seem to like the '||' but i need it to say if the source is Vacanacy Lead, if the soruce date is between the specified and if the Company Group Type Text equals Potentials or trusted or influencer or associate.
The only part it isn't liking is the Company Group Type Text equals Potentials or trusted or influencer or associate.
IF(
Candidate__r.Company_Group_Type_Text__c == 'Potentials',
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qF', ''),
IF(
Candidate__r.Company_Group_Type_Text__c == 'Trusted',
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qZ',''),
IF(
Candidate__r.Company_Group_Type_Text__c == 'Associate',
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qK', ''),
IF(
Candidate__r.Company_Group_Type_Text__c == 'Influencer',
IMAGE('/servlet/servlet.FileDownload?file=0151v000003E7qU', ''),
IF(
Candidate__r.Contact_ID__c == '0030Y00001JQUHr',
IMAGE('/servlet/servlet.FileDownload?file=0151j000000DoLm', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 7 && Source_Date__c <= TODAY(),
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp1y', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 14 && Source_Date__c <= TODAY() - 8,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3f', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 21 && Source_Date__c <= TODAY() - 15,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3G', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 28 && Source_Date__c <= TODAY() - 22,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3V', ''),
IF(
Source__c == 'Vacancy Lead' && Source_Date__c >= TODAY() - 7 && Source_Date__c <= TODAY()&& Candidate__r.Company_Group_Type_Text__c == 'Influencer' || 'Potentials' || 'Trusted' || 'Associate',
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp1y', ''),
IF(
Source__c == 'Vacancy Lead' && Candidate__r.Company_Group_Type_Text__c == 'Influencer' || 'Potentials' || 'Trusted' || 'Associate' && Source_Date__c >= TODAY() - 14 && Source_Date__c <= TODAY() - 8,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3f', ''),
IF(
Source__c == 'Vacancy Lead' && Candidate__r.Company_Group_Type_Text__c == 'Influencer' || 'Potentials' || 'Trusted' || 'Associate' && Source_Date__c >= TODAY() - 21 && Source_Date__c <= TODAY() - 15,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3G', ''),
IF(
Source__c == 'Vacancy Lead' && Candidate__r.Company_Group_Type_Text__c == 'Influencer' || 'Potentials' || 'Trusted' || 'Associate' && Source_Date__c >= TODAY() - 28 && Source_Date__c <= TODAY() - 22,
IMAGE('/servlet/servlet.FileDownload?file=0151j000000Dp3V', ''),
NULL
)))))))))))))
The highlighted section i have recently added and is the issue, it doesn't seem to like the '||' but i need it to say if the source is Vacanacy Lead, if the soruce date is between the specified and if the Company Group Type Text equals Potentials or trusted or influencer or associate.
The only part it isn't liking is the Company Group Type Text equals Potentials or trusted or influencer or associate.
try replacing the line with below code
Thanks
Ramesh
All Answers
try replacing the line with below code
Thanks
Ramesh
This works perfectly! thanks for your help