You need to sign in to do that
Don't have an account?
Michael M
Formula to 2 lookup fields
Conditional Formula
My Lead object has 2 lookups fields: one to a custom object, and one to Opportunity. In some scenarios, only one of those lookup fields will be populated. The custom object and Opportunity object both contain fields that record the same information relevant to the Lead. I need to create a formula field on Lead, that looks to BOTH objects to display its formula, so that if one of the lookup fields is not populated, the relevant information will display on the Lead record from the other lookup record. How would I write that formula? Here is a template which of course doesn't work, but is the point where I'm stuck.
1. This one would be for a checkbox formula field
IF(CustomRehosp__r.Concerns__c =true, IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30),"")
ELSE
IF(Opportunity.Concerns__c =true, IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30),"")
2. This one would be for a text formula field
CustomRehosp__r.Concern_Notes__c
ELSE
Opportunitiy.Concern_Notes__c
My Lead object has 2 lookups fields: one to a custom object, and one to Opportunity. In some scenarios, only one of those lookup fields will be populated. The custom object and Opportunity object both contain fields that record the same information relevant to the Lead. I need to create a formula field on Lead, that looks to BOTH objects to display its formula, so that if one of the lookup fields is not populated, the relevant information will display on the Lead record from the other lookup record. How would I write that formula? Here is a template which of course doesn't work, but is the point where I'm stuck.
1. This one would be for a checkbox formula field
IF(CustomRehosp__r.Concerns__c =true, IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30),"")
ELSE
IF(Opportunity.Concerns__c =true, IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30),"")
2. This one would be for a text formula field
CustomRehosp__r.Concern_Notes__c
ELSE
Opportunitiy.Concern_Notes__c
Try the below ways:
1. IF( CustomRehosp__r.Concerns__c =true , IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30), IF( Opportunity.Concerns__c =true , IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30),"" ) )
2. IF( NOT(ISBLANK(CustomRehosp__r.Concern_Notes__c)) , IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30), IF( NOT(ISBLANK(Opportunitiy.Concern_Notes__c)) , IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30),"" )
)
Thanks,
Maharajan.C
All Answers
Try the below ways:
1. IF( CustomRehosp__r.Concerns__c =true , IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30), IF( Opportunity.Concerns__c =true , IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30),"" ) )
2. IF( NOT(ISBLANK(CustomRehosp__r.Concern_Notes__c)) , IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30), IF( NOT(ISBLANK(Opportunitiy.Concern_Notes__c)) , IMAGE('/servlet/servlet.FileDownload?file=0152g0000009NGo',"",30,30),"" )
)
Thanks,
Maharajan.C
For 2, I don't want to display the image, I simply want to display the text of "Concern Notes" field.
So if CustomRehosp__r.Concern_Notes__c is filled in, I want that text to display on the lead, and if not, then if Opportunity.Concern_notes__c is filled in then I want to display that. Can that be done?
)
Thanks,
Maharajan.C