Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to use a roll up or formula field to count the number of "true" or "false" values on a boolean field of a detail record?


Account <-Master-----Detail-> My_Object__c

My_Object__c has a boolean (checkbox) field called My_Boolean__c

I want to create a field on Account Object that will tell me how many of the child objects have My_Boolean__c set to false.

Is this possible without creating a trigger or workflow?

share|improve this question

As you spotted, this can be done declaratively in one fell swoop!

  1. On the Master, create a Roll-up Summary called CountMyBoolean__c with COUNT

  2. Under Filter Criteria choose 'records meeting certain criteria' and MyBoolean__c equals True

share|improve this answer
yea, I considered this. I just wanted to check if there was a way to do skipping step one. Guess one extra field won't hurt... – NSjonas Apr 11 '14 at 2:04
wait, can I use rollup with record count and do a filter on boolean_field = true? – NSjonas Apr 11 '14 at 2:12
Ah great spot - yes, you can use Filter Criteria in roll up summaries! Go with COUNT() instead. – bigassforce Apr 11 '14 at 2:16
Remember the Apex Ten commandments. Thou shalt find a happy balance between clicks and code ( – Francis Apr 11 '14 at 7:28
user320 strikes again! and @Francis manages to plug his presentation, again ;) – Simon Lawrence Apr 11 '14 at 10:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.