I am trying to make a formula field under campaign that will give the exact value of responded leads who are under one campaign.

I've coded this so far but it doesn't work. What it basically should do is take the marked Responded field and check if its false, and if that is satisfied get the campaign number of leads - those leads who have status UNMARKED. That should give the exact no. of leads who have responded mark. Number of Leads (Under campaign) is a number field predefined by salesforce Responded (Under Leads) is a checkbox field created by me

IF(Lead.Responded__c = FALSE, Campaign.NumberOfLeads  -  Lead.Responded__c, "")

Please advise, Darko


A simple formula can't work as there is a 1 to many relationship involved.

A roll-up summary field can be used to achieve something this. But you need to rely on the Status of the Campaign Member (e.g. via the Lead details page) being set to "Responded" rather than add your own field. (Do you have a strong reason to add your own field? The platform generally works better if you use the available mechanisms already in it.) The platform will automatically maintain the count.

The field definition on Campaign would look like this:

roll-up field definition

| improve this answer | |
  • Hi Keith, Thank you for your help but it still not showing the numbers :( – Darko Todorovski Nov 17 '14 at 8:42
  • additionally if i set it up to false it gives the exact no of leads that are in campaign members. Most of them have already set up with responded=true but not giving results. :( – Darko Todorovski Nov 17 '14 at 9:10
  • @DarkoTodorovski The roll-up field approach is based on the Status field not any custom field you add. Are you saying that for you setting the Status to "Responded" does not affect the count? – Keith C Nov 17 '14 at 9:23
  • Oh i wanted to set up this roll-up field to be based on random field called Responded (checkbox) and get all values from that certain lead. But anyway maybe i wasnt that clear or maybe i can try using your way of thinking. Give me a few to think about it how i can implement this. Thanks for your help Keith – Darko Todorovski Nov 17 '14 at 9:31
  • Ok Keith, I've figured this out. Inside the campaign, where there are campaign members there is an edit next to that specific member. When you open that field a custom page layout is shown for that specific lead under that specific campaign. When you set up those fields there you can get the exact information that you want. That I want!. Following your example everything can be shown from there to campaign page layout. Thanks, Darko – Darko Todorovski Nov 17 '14 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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