Mother of all If statements pt2 - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Deborah WarnerDeborah Warner 

Mother of all If statements pt2

Thank you 
Just to provide some further background the formula is to be placed on a field called Donor Profile. The field Donor Profile Override allows us to manually overwrite a value in the Donor Profile field if we wish to.


All of the fields are on the Account Object. So as well as the field previously mentioned I have to include the following

Band A
BP_Stage__c , Picklist Value = "Notified" or "Prospect"
VIP__c,    Checkbox    = True
MAJ__c,  Checkbox     = True
TPF__c,  Checkbox     = True AND Largest_Single_Donation__c >2000
NOK__c, Checkbox     = True AND Largest_Single_Donation__c >2000
Committee_Member__c , Checkbox   = True
Org_Primary_Category__c - Picklist Value = "Trusts/PPF"  OR  "Foundation"
Band B
Loyal__c, Checkbox   = True
Reg Giv__c, Checkbox = True
Memorial__c,Checkbox = True
TPF__c, Checkbox = True  
NOK__c, Checkbox = True 

Largest_Single_Donation__c = >500 AND <2000

John KuceraJohn Kucera
Do you have a question?  I didn't see a link to part 1, so not sure what you're posting here.
Steve MolisSteve Molis
Okay, I think I might be ready to take a crack at this sucker...  Just so that I understand this, you want to evaluate:
  • 8 Checkbox Fields
  • 2 Picklist Fields
  • 1 Currency Field
and return 1 of 3 values:
  • Band A
  • Band B
  • Band C 
Is that correct?

Are each of the fields evaluated separately?  
By that I mean if ANY of the conditions in Group 1 are TRUE then the Donor is in Band-A?
Or do ALL of the conditions have to be TRUE for a Donor to qualify for Band-A?  
Deborah WarnerDeborah Warner
oooh thank you stevemo.
ok your correct on the fields and bands and  it's if any of the conditions are true then the donor is in Band A, Band B etc. Obviously if they don't meet any of the criteria they go into Band C.
Thanks once again stevemo
Steve MolisSteve Molis
You might want to double-check the field names and values, but I think it's all there:

IF(
OR(
(VIP__c),
(MAJ__c),
(Committee_Member__c),
AND((TPF__c), Largest_Single_Donation__c >2000),
AND((NOK__c), Largest_Single_Donation__c >2000),
ISPICKVAL(BP_Stage__c , "Notified"),
ISPICKVAL(BP_Stage__c , "Prospect"),
ISPICKVAL(Org_Primary_Category__c, "Trusts/PPF"),
ISPICKVAL(Org_Primary_Category__c, "Foundation")),"Band A",
IF(
OR(
(Loyal__c),
Reg Giv__c),
(Memorial__c),
(TPF__c),
(NOK__c),
Largest_Single_Donation__c > 500),"Band B",
"Band C"))


Now here it is, your Moment of Zen...
http://www.youtube.com/watch?v=mvzIPnfSaDI

 
Deborah WarnerDeborah Warner
Thank you stevemo!