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
barbkuntzbarbkuntz 

How do I write a query against a boolean field?

I have a new requirement for my lead scoring formula.  I need a line that says "If HasOptedOutOfEmail" equals "True" score the entire lead as 0. 
 
My existing formula reads:
 
__________________________________________________________
 
IF( OR(
       ISPICKVAL ( Status , "Duplicate Lead" )  ,
       ISPICKVAL ( Status , "No Potential" )
       ) ,
      0  ,
      IF(
          OR(
             Contains (Email, "yahoo" ) ,
             Contains (Email, "hotmail" ) ,
             Contains (Email, "gmail" ) ,
             Contains (Email, "rr.com" ) ,
             Contains (Email, "aol" ) ,
Contains (Email, "earthlink"),
             Contains (Email, "verizon" )
            ) ,
            2 ,                   
            +(
                CASE ( LeadSource ,
                       "Advertising", 4,
                       "Directory Listing (paid)", 3,
                       "Directory Listing (unpaid)", 1,
                       "Email", 4, "E Newsletter", 5,
                       "Inbound Call MUC", 5,
                       "Inside Sales", 1,
                       "Other", 1,
                       "Press Release", 3,
                       "Rep Lead", 1,
                       "Seminar / Conference", 4,
                       "Technical Article", 4,
                       "Top 10", 1,
                       "Tradeshow", 5,
                       "Web", 5,
                       "Organic - Google", 5,
                       "PPC - Google", 5,
                       "Google AdWords", 5,
                        0)
                  +
                CASE (Industry ,
                       "Aerospace", 5,
"Alternative Energy", 5,
"Automation", 3,
"Automotive", 4,
"Batteries", 4,
"Chemicals", 2,
"Communications", 3,
"Computers & Peripherals", 3,
"Contract Mfr", 3,
"Crystal", 2,
"Defense/Military", 4,
"Displays", 4,
"Electronic Components", 4,
"Heating Elements", 3,
"Home Appliance", 2,
"LED", 1,
"Lighting", 3,
"Manufacturing", 1,
"Medical", 5,
"Misc", 1,
"Motors & Coils", 3,
"Nuclear Power", 5,
"Photonics", 4,
"Semiconductors", 3,
"Solar Cells", 5,
"Technology", 1,
"Telecom", 2,
"Tools", 2,
                       0)
                )
         )
  )
JakesterJakester
You can probably put this several places in your code, and the code is very simple:

Code:
If(HasOptedOutOfEmail,0,[what to do next])

 

barbkuntzbarbkuntz
Thank you! That did it!